diff options
author | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2015-08-18 20:49:32 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2015-08-18 20:49:32 +0200 |
commit | 8a8ab5dcaa7ab03e19a15e9cb2eafd6404e2d6ef (patch) | |
tree | 70a0c4a2c62be0db2520952bfd9d07be0dda46c4 | |
parent | c59d2fbb8ae60c7bcd199b7080c3aaf760a0a602 (diff) | |
download | tcpdump-8a8ab5dcaa7ab03e19a15e9cb2eafd6404e2d6ef.tar.gz |
Compile with '-Wdeclaration-after-statement' in devel mode
-rw-r--r-- | aclocal.m4 | 1 | ||||
-rwxr-xr-x | configure | 32 |
2 files changed, 33 insertions, 0 deletions
@@ -949,6 +949,7 @@ AC_DEFUN(AC_LBL_DEVEL, AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith) AC_LBL_CHECK_COMPILER_OPT($1, -Wcast-qual) AC_LBL_CHECK_COMPILER_OPT($1, -Wshadow) + AC_LBL_CHECK_COMPILER_OPT($1, -Wdeclaration-after-statement) AC_LBL_CHECK_COMPILER_OPT($1, -W) fi AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT() @@ -7880,6 +7880,38 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdeclaration-after-statement option" >&5 +$as_echo_n "checking whether the compiler supports the -Wdeclaration-after-statement option... " >&6; } + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wdeclaration-after-statement" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +return 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$save_CFLAGS" + V_CCOPT="$V_CCOPT -Wdeclaration-after-statement" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$save_CFLAGS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5 $as_echo_n "checking whether the compiler supports the -W option... " >&6; } save_CFLAGS="$CFLAGS" |