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.
ZEND_ATTRIBUTE_NODISCARD
1 parent 3e99869 commit ba326b6Copy full SHA for ba326b6
Zend/zend_portability.h
@@ -248,7 +248,7 @@ char *alloca();
248
# define ZEND_ATTRIBUTE_ALLOC_SIZE2(X,Y)
249
#endif
250
251
-#if __STDC_VERSION__ >= 202311L
+#if __STDC_VERSION__ >= 202311L || (defined(__cplusplus) && __cplusplus >= 201703L)
252
# define ZEND_ATTRIBUTE_NODISCARD [[nodiscard]]
253
#elif __has_attribute(__warn_unused_result__)
254
# define ZEND_ATTRIBUTE_NODISCARD __attribute__((__warn_unused_result__))
0 commit comments