summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 7 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 9e1963970c..617d6d2452 100644
--- a/meson.build
+++ b/meson.build
@@ -516,9 +516,6 @@ add_project_link_arguments(
userspace_c_args += cc.get_supported_arguments(possible_cc_flags)
userspace_c_ld_args += cc.get_supported_link_arguments(possible_link_flags)
-have = cc.has_argument('-Wzero-length-bounds')
-conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have)
-
if cc.compiles('''
#include <time.h>
#include <inttypes.h>
@@ -538,14 +535,19 @@ endif
cpp = ' '.join(cc.cmd_array() + get_option('c_args')) + ' -E'
-has_wstringop_truncation = cc.has_argument('-Wstringop-truncation')
+# new in GCC 10
+have = cc.has_argument('-Wzero-length-bounds')
+conf.set10('HAVE_WARNING_ZERO_LENGTH_BOUNDS', have)
+
+# new in GCC 15
+have = cc.has_argument('-Wzero-as-null-pointer-constant')
+conf.set10('HAVE_WARNING_ZERO_AS_NULL_POINTER_CONSTANT', have)
#####################################################################
# compilation result tests
conf.set('_GNU_SOURCE', 1)
conf.set('__SANE_USERSPACE_TYPES__', true)
-conf.set10('HAVE_WSTRINGOP_TRUNCATION', has_wstringop_truncation)
conf.set('SIZEOF_DEV_T', cc.sizeof('dev_t', prefix : '#include <sys/types.h>'))
conf.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>'))