From dcd2e1d8ca1f9c82b3aff2833a59a38b9780720f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 9 Sep 2022 23:51:31 +0300 Subject: [PATCH 15/21] Enable -Warray-bounds for --enable-debug builds See osdn #45543 Signed-off-by: Marko Lindqvist --- m4/debug.m4 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/m4/debug.m4 b/m4/debug.m4 index 1461eebd1c..3d985f213d 100644 --- a/m4/debug.m4 +++ b/m4/debug.m4 @@ -45,14 +45,9 @@ 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 \ - -Wno-array-bounds], + -Wshadow -Wold-style-declaration -Wtype-limits], [], [EXTRA_DEBUG_CFLAGS]) if test "x$cxx_works" = "xyes" ; then FC_CXX_FLAGS([-Werror -Wmissing-prototypes \ -- 2.35.1