From 0806827f7a319139fc9ce40da30788a90f522713 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 20 Sep 2021 01:09:16 +0300 Subject: [PATCH 13/13] debug.m4: Disable array-bounds warnings when -Werror present See osdn #42885 Signed-off-by: Marko Lindqvist --- m4/debug.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/m4/debug.m4 b/m4/debug.m4 index ee395a7d00..d1942d43da 100644 --- a/m4/debug.m4 +++ b/m4/debug.m4 @@ -43,9 +43,14 @@ if test "x$enable_debug" = "xyes" -o "x$enable_debug" = "xchecks"; then AC_DEFINE([DEBUG], [1], [Extra debugging support, backward compatibility macro]) AC_DEFINE([LUA_USE_APICHECK], [1], [Lua Api checks]) + dnl With -Werror we have to have -Wno-array-bounds as gcc-12 generates + dnl a false positive about that kind of error. + dnl Deemed not-a-bug by gcc people: + dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102405 FC_C_FLAGS([-Werror -Wmissing-prototypes -Wmissing-declarations \ -Wformat -Wformat-security -Wnested-externs \ - -Wshadow -Wold-style-declaration -Wtype-limits], + -Wshadow -Wold-style-declaration -Wtype-limits \ + -Wno-array-bounds], [], [EXTRA_DEBUG_CFLAGS]) if test "x$cxx_works" = "xyes" ; then FC_CXX_FLAGS([-Werror -Wmissing-prototypes \ -- 2.33.0