From e940222e73d9f6fd7025a1967fa874fb431c54c0 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 3 Sep 2022 07:06:57 +0300 Subject: [PATCH 52/52] Enable -Warray-bounds for --enable-debug builds See osdn #45543 Signed-off-by: Marko Lindqvist --- m4/debug.m4 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/m4/debug.m4 b/m4/debug.m4 index 091133dce7..d7038b4836 100644 --- a/m4/debug.m4 +++ b/m4/debug.m4 @@ -44,14 +44,10 @@ if test "x$enable_debug" = "xyes" -o "x$enable_debug" = "xchecks"; then AC_DEFINE([FREECIV_DEBUG], [1], [Extra debugging support]) 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 -Wold-style-definition \ - -Wtype-limits -Wno-array-bounds], + -Wtype-limits], [], [EXTRA_DEBUG_CFLAGS]) if test "x$cxx_works" = "xyes" ; then FC_CXX_FLAGS([-Werror -Wmissing-prototypes -Wmissing-declarations \ -- 2.35.1