From d7a8f8d73a824808a63fc8f8a8d11e901b09e705 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 29 Mar 2021 11:17:21 +0100 Subject: [PATCH] Turn off -Wdeclaration-after-statement and allow C99 I think this far into the 21st century we can allow declarations to be in the middle of code blocks. Even MSVC supports that, even if it doesn't do other parts of C99 like named struct initialisers. Signed-off-by: David Woodhouse --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8dc46994..bdb1138b 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ symver_win32_strerror= # is conditional (as it is here for some of the MinGW checks), it forgets # to ever look for one in the other code paths. Do it explicitly here. AC_PROG_CC +AC_PROG_CC_C99 case $host_os in *linux* | *gnu* | *nacl*) @@ -181,7 +182,6 @@ AS_COMPILER_FLAGS(WFLAGS, -Wno-sign-compare -Wno-unused-parameter -Werror=pointer-to-int-cast - -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wformat-nonliteral -Wformat-security -- 2.49.0