diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-12-19 06:28:11 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2021-12-19 06:28:11 +0000 |
commit | d6265727ce8ec0b9414bb46c6f77fc274305fe0b (patch) | |
tree | 075bee93f6bd000a10b429be85f99b578a18930d /src/include | |
parent | 8bae2850e47c3a70dbc43d1e26a8e636b8a8d8ee (diff) | |
download | skalibs-d6265727ce8ec0b9414bb46c6f77fc274305fe0b.tar.xz |
Add gccattr_nonstring, modernize gccattributes.h
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/skalibs/gccattributes.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/include/skalibs/gccattributes.h b/src/include/skalibs/gccattributes.h index 2797bb1..ca6e7c1 100644 --- a/src/include/skalibs/gccattributes.h +++ b/src/include/skalibs/gccattributes.h @@ -5,26 +5,27 @@ #ifdef __GNUC__ -#define gccattr_noreturn __attribute__((__noreturn__)) -#define gccattr_returns_twice __attribute__((__returns_twice__)) -#define gccattr_noinline __attribute__((__noinline__)) -#define gccattr_inline __attribute__((__always_inline__)) -#define gccattr_const __attribute__((__const__)) -#define gccattr_unused __attribute__((__unused__)) -#define gccattr_used __attribute__((__used__)) -#define gccattr_weak __attribute__((__weak__)) -#define gccattr_aligned __attribute__((__aligned__)) +#define gccattr_noreturn __attribute__((noreturn)) +#define gccattr_returns_twice __attribute__((returns_twice)) +#define gccattr_noinline __attribute__((noinline)) +#define gccattr_inline __attribute__((always_inline)) +#define gccattr_const __attribute__((const)) +#define gccattr_unused __attribute__((unused)) +#define gccattr_used __attribute__((used)) +#define gccattr_weak __attribute__((weak)) +#define gccattr_aligned __attribute__((aligned (__BIGGEST_ALIGNMENT__))) +#define gccattr_nonstring __attribute__((nonstring)) # if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) -#define gccattr_malloc __attribute__((__malloc__)) -#define gccattr_pure __attribute__((__pure__)) +#define gccattr_malloc __attribute__((malloc)) +#define gccattr_pure __attribute__((pure)) # else #define gccattr_malloc #define gccattr_pure # endif # if (__GNUC__ >= 3) -#define gccattr_deprecated __attribute__((__deprecated__)) +#define gccattr_deprecated __attribute__((deprecated)) # else #define gccattr_deprecated # endif @@ -40,6 +41,7 @@ #define gccattr_used #define gccattr_weak #define gccattr_aligned +#define gccattr_nonstring #define gccattr_malloc #define gccattr_pure #define gccattr_deprecated |