macro-fundamental: add _nonnull_if_nonzero_

Introduced in gcc 15:
https://github.com/gcc-mirror/gcc/commit/19fe55c4801de50deee03b333e94d007aae222e3
This commit is contained in:
Mike Yuan
2025-02-16 12:37:10 +09:00
committed by Yu Watanabe
parent 034f027be4
commit 3aa0cf23b4
+6
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)