]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Compile with '-Wpedantic' in devel mode as an attempt to get gcc-ism
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 19 Aug 2015 14:50:22 +0000 (16:50 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 19 Aug 2015 14:50:22 +0000 (16:50 +0200)
aclocal.m4
configure

index 042bccf2fb1c8ed2ffe39a7405b07bb3f3b7ffb7..7c6d5b24baf8e028cc0789f6658aecfb5145b911 100644 (file)
@@ -950,6 +950,7 @@ AC_DEFUN(AC_LBL_DEVEL,
                    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, -Wcast-qual)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wshadow)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wdeclaration-after-statement)
+                   AC_LBL_CHECK_COMPILER_OPT($1, -Wpedantic)
                    AC_LBL_CHECK_COMPILER_OPT($1, -W)
            fi
            AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
                    AC_LBL_CHECK_COMPILER_OPT($1, -W)
            fi
            AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
index 021d5c00ea1ae38d0406d0ecd28094b3fd5996e2..822c1abe18f481a0cf8b4592c0f5e3c159e0ca81 100755 (executable)
--- a/configure
+++ b/configure
@@ -7912,6 +7912,38 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
+$as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
+       save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wpedantic"
+       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 -Wpedantic"
+
+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"
        { $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"