From: Julian Seward Date: Tue, 8 Jul 2014 07:40:56 +0000 (+0000) Subject: Add -Wno-tautological-compare to the standard compile flags, if that X-Git-Tag: svn/VALGRIND_3_10_0~301 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9fa7e148378fbe5da08b65ba2407ed7541f3d39;p=thirdparty%2Fvalgrind.git Add -Wno-tautological-compare to the standard compile flags, if that is accepted. With XCode 5.5.1 -Wtautological-compare appears to come as standard, and it generates a lot of mostly useless noise. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14136 --- diff --git a/Makefile.all.am b/Makefile.all.am index b3b344a7cf..0d30ed5e40 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -105,6 +105,7 @@ AM_CFLAGS_BASE = \ -Wstrict-prototypes \ -Wmissing-declarations \ @FLAG_W_NO_FORMAT_ZERO_LENGTH@ \ + @FLAG_W_NO_TAUTOLOGICAL_COMPARE@ \ -fno-strict-aliasing \ -fno-builtin diff --git a/configure.ac b/configure.ac index e87a2e4c66..c91ea94644 100644 --- a/configure.ac +++ b/configure.ac @@ -1727,6 +1727,25 @@ AC_MSG_RESULT([no]) CFLAGS=$safe_CFLAGS +# does this compiler support -Wno-tautological-compare ? + +AC_MSG_CHECKING([if gcc accepts -Wno-tautological-compare]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-Wno-tautological-compare" + +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ + return 0; +]])], [ +AC_SUBST([FLAG_W_NO_TAUTOLOGICAL_COMPARE], [-Wno-tautological-compare]) +AC_MSG_RESULT([yes]) +], [ +AC_SUBST([FLAG_W_NO_TAUTOLOGICAL_COMPARE], []) +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + + # does this compiler support -Wno-nonnull ? AC_MSG_CHECKING([if gcc accepts -Wno-nonnull])