]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Turn off -Wdeclaration-after-statement and allow C99
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 29 Mar 2021 10:17:21 +0000 (11:17 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 29 Mar 2021 21:48:16 +0000 (22:48 +0100)
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 <dwmw2@infradead.org>
configure.ac

index 8dc46994590d3a74cc15162337ad053e85bc63bb..bdb1138bb73fdc77adcf68fdf2f6d3e264af4948 100644 (file)
@@ -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