macro-fundamental: add _nonnull_if_nonzero_

Introduced in gcc 15:
19fe55c480
This commit is contained in:
Mike Yuan
2025-02-15 23:02:52 +01:00
committed by Yu Watanabe
parent 034f027be4
commit 3aa0cf23b4

View File

@@ -112,6 +112,12 @@
# define _fallthrough_ __attribute__((__fallthrough__))
#endif
#if __GNUC__ >= 15
# define _nonnull_if_nonzero_(p, n) __attribute__((nonnull_if_nonzero(p, n)))
#else
# define _nonnull_if_nonzero_(p, n)
#endif
#define XSTRINGIFY(x) #x
#define STRINGIFY(x) XSTRINGIFY(x)