|
From: <sv...@va...> - 2014-07-08 07:41:25
|
Author: sewardj
Date: Tue Jul 8 07:40:56 2014
New Revision: 14136
Log:
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.
Modified:
trunk/Makefile.all.am
trunk/configure.ac
Modified: trunk/Makefile.all.am
==============================================================================
--- trunk/Makefile.all.am (original)
+++ trunk/Makefile.all.am Tue Jul 8 07:40:56 2014
@@ -105,6 +105,7 @@
-Wstrict-prototypes \
-Wmissing-declarations \
@FLAG_W_NO_FORMAT_ZERO_LENGTH@ \
+ @FLAG_W_NO_TAUTOLOGICAL_COMPARE@ \
-fno-strict-aliasing \
-fno-builtin
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Jul 8 07:40:56 2014
@@ -1727,6 +1727,25 @@
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])
|