diff options
| author | jvoisin | 2023-09-21 15:50:32 +0200 |
|---|---|---|
| committer | jvoisin | 2023-09-21 15:50:32 +0200 |
| commit | 8c2352b985b1bf69efb965ba15f5e300eb7e8e12 (patch) | |
| tree | 9901e915156ca32c0b9f006f3139ba34958f68ef /include/strings.h | |
| parent | 46add4c4aecbbb8edb4b70ac5ed3a8c144f497ee (diff) | |
Properly enable diagnose_as_builtin attribute
Diffstat (limited to 'include/strings.h')
| -rw-r--r-- | include/strings.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/strings.h b/include/strings.h index 530572a..8b99ccd 100644 --- a/include/strings.h +++ b/include/strings.h | |||
| @@ -33,7 +33,6 @@ extern "C" { | |||
| 33 | #undef bzero | 33 | #undef bzero |
| 34 | __access(write_only, 2, 3) | 34 | __access(write_only, 2, 3) |
| 35 | __access(read_only, 1, 3) | 35 | __access(read_only, 1, 3) |
| 36 | __diagnose_as_builtin(__builtin_bcopy, 1, 2, 3) | ||
| 37 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | 36 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, |
| 38 | void * _FORTIFY_POS0 __d, size_t __n) | 37 | void * _FORTIFY_POS0 __d, size_t __n) |
| 39 | { | 38 | { |
| @@ -46,7 +45,9 @@ _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | |||
| 46 | } | 45 | } |
| 47 | 46 | ||
| 48 | __access(write_only, 1, 2) | 47 | __access(write_only, 1, 2) |
| 48 | #if __has_builtin(__builtin_bzero) | ||
| 49 | __diagnose_as_builtin(__builtin_bzero, 1, 2) | 49 | __diagnose_as_builtin(__builtin_bzero, 1, 2) |
| 50 | #endif | ||
| 50 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) | 51 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) |
| 51 | { | 52 | { |
| 52 | size_t __b = __bos(__s, 0); | 53 | size_t __b = __bos(__s, 0); |
