commit d6265727ce8ec0b9414bb46c6f77fc274305fe0b parent 8bae2850e47c3a70dbc43d1e26a8e636b8a8d8ee Author: Laurent Bercot <ska-skaware@skarnet.org> Date: Sun, 19 Dec 2021 06:28:11 +0000 Add gccattr_nonstring, modernize gccattributes.h Signed-off-by: Laurent Bercot <ska@appnovation.com> Diffstat:
M | src/include/skalibs/gccattributes.h | | | 26 | ++++++++++++++------------ |
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git 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