aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-05-17 22:24:26 +0000
committerGuy Harris <guy@alum.mit.edu>2011-05-17 22:24:26 +0000
commite902f33d18d034b5e61bc5e7889ec3982c1d98a3 (patch)
tree232ad688c261239be55954e2bc543ab5fe6a5d3a /configure.in
parent747a964aef0aa48cac7120697b890bc858271a06 (diff)
Add -Wold-style-definition and -Wdeclaration-after-statement to the list
of warnings we enable by default; we'll move them if they break any builds in non-fixable ways. Add -Wmissing-prototypes and -Wmissing-declarations to the list of things we don't enable by default, and explain why those, and -Wstrict-prototypes can't be used. Also explain why we check for clang before checking whether we can enable -fexcess-precision=fast. svn path=/trunk/; revision=37219
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 515d9f43cb..ebc7ea47a8 100644
--- a/configure.in
+++ b/configure.in
@@ -329,7 +329,6 @@ AC_ARG_ENABLE(extra-gcc-checks,
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Waddress)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wattributes)
- AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdiv-by-zero)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wignored-qualifiers)
@@ -343,7 +342,14 @@ AC_ARG_ENABLE(extra-gcc-checks,
# for now.
#
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
+ #
+ # GLib blocks this for now.
+ #
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
+ #
+ # All the registration functions block these for now.
+ #
+ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-prototypes)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-declarations)
#
# epan/dissectors/packet-afs.c blocks this one for now.
@@ -364,7 +370,16 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
-# Use the faster pre gcc 4.5 floating point precision
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wold-style-definition)
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
+
+#
+# Use the faster pre gcc 4.5 floating point precision if available;
+# clang doesn't error out on -f options that it doesn't know about,
+# it just warns and ignores them, so this check doesn't cause us
+# to omit -fexcess-precision=fast, which produces a pile of
+# annoying warnings.
+#
if test "x$CC" != "xclang" ; then
AC_WIRESHARK_GCC_CFLAGS_CHECK(-fexcess-precision=fast)
fi