We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RET_NONNULL
1 parent d0afa2f commit 9648d84Copy full SHA for 9648d84
lib/config.h
@@ -121,11 +121,11 @@
121
# define DEPRECATED
122
#endif
123
124
-// TODO: GCC apparently also supports this but there is no documentation on it
125
// returns_nonnull
126
#if __has_cpp_attribute (gnu::returns_nonnull)
127
# define RET_NONNULL [[gnu::returns_nonnull]]
128
-#elif (defined(__clang__) && ((__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ >= 7))))
+#elif (defined(__clang__) && ((__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ >= 7)))) \
+ || (defined(__GNUC__) && (__GNUC__ >= 9))
129
# define RET_NONNULL __attribute__((returns_nonnull))
130
#else
131
# define RET_NONNULL
0 commit comments