From 15533c88978a33a7f3c9eda8dbf96463bb6f7dc2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 1 Jun 2016 16:13:41 -0400 Subject: [PATCH] Set our autoconf-breaking options last, not before we check for others --- configure.ac | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index f80cb47dac..5bd35e248f 100644 --- a/configure.ac +++ b/configure.ac @@ -1671,15 +1671,6 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then CFLAGS="$CFLAGS -Wno-system-headers" ;; esac - - CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith" - CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings" - CFLAGS="$CFLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2" - CFLAGS="$CFLAGS -Wwrite-strings -Wmissing-declarations" - CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum" - CFLAGS="$CFLAGS -Waggregate-return -Wpacked -Wunused" - CFLAGS="$CFLAGS -Wunused-parameter" - # GCC4.3 users once report trouble with -Wstrict-overflow=5. GCC5 users # have it work better. # CFLAGS="$CFLAGS -Wstrict-overflow=1" @@ -1705,7 +1696,6 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then -Wmissing-noreturn -Wnormalized=id -Wnull-dereference - -Wold-style-definition -Woverlength-strings -Woverride-init -Wshift-count-negative @@ -1727,6 +1717,17 @@ if test "x$enable_gcc_warnings_advisory" != "xno"; then -Wvariadic-macros ], [ TOR_CHECK_CFLAGS([warning_flag]) ]) + CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith" + CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings" + CFLAGS="$CFLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2" + CFLAGS="$CFLAGS -Wwrite-strings" + CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum" + CFLAGS="$CFLAGS -Waggregate-return -Wpacked -Wunused" + CFLAGS="$CFLAGS -Wunused-parameter " + # These interfere with building main() { return 0; }, which autoconf + # likes to use as its default program. + CFLAGS="$CFLAGS -Wold-style-definition -Wmissing-declarations" + if test "$tor_cv_cflags__Wnull_dereference" = "yes"; then AC_DEFINE([HAVE_CFLAG_WNULL_DEREFERENCE], 1, [True if we have -Wnull-dereference]) fi