[tz] [PATCH] Modernize GCC_DEBUG_FLAGS

Paul Eggert eggert at cs.ucla.edu
Tue Mar 24 19:10:13 UTC 2015


* Makefile (GCC_DEBUG_FLAGS): Assume GCC 4.9.2 and current tz sources.
Add -Wdate-time, -Wdouble-promotion, -Wlogical-op,
-Wold-style-definition, -Wunused.  Remove redundant -Wcast-qual
and -Wno-cast-qual.  Remove -Wmissing-declarations; implied by
-Wmissing-prototypes.  Remove -Wmissing-noreturn; equivalent to
-Wsuggest-attribute=noreturn.  Remove -Wno-sign-conversion; not
needed, as we don't use -Wconversion.  Put the -Wno-* options
last, so that they override preceding options that enable warnings.
---
 Makefile | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index fbb027a..e7043af 100644
--- a/Makefile
+++ b/Makefile
@@ -149,18 +149,18 @@ LDLIBS=
 #  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
 GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
 	-Wall -Wextra \
-	-Wbad-function-cast -Wcast-align -Wcast-qual \
+	-Wbad-function-cast -Wcast-align -Wdate-time \
 	-Wdeclaration-after-statement \
+	-Wdouble-promotion \
 	-Wformat=2 -Winit-self -Wjump-misses-init \
-	-Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
-	-Wnested-externs -Wno-address -Wno-cast-qual \
-	-Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
-	-Wno-type-limits \
-	-Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
+	-Wlogical-op -Wmissing-prototypes -Wnested-externs \
+	-Wold-style-definition -Woverlength-strings -Wpointer-arith \
 	-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
 	-Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
 	-Wsuggest-attribute=pure -Wtrampolines \
-	-Wwrite-strings
+	-Wunused -Wwrite-strings \
+	-Wno-address -Wno-format-nonliteral -Wno-sign-compare \
+	-Wno-type-limits -Wno-unused-parameter
 #
 # If you want to use System V compatibility code, add
 #	-DUSG_COMPAT
-- 
2.1.0




More information about the tz mailing list