Mercurial > hg > truffle
changeset 8722:67342b960b47
8008474: Add -Wundef to warning flags.
Summary: Force use of undefined macros to be and error.
Reviewed-by: dholmes, mikael
author | jprovino |
---|---|
date | Wed, 06 Mar 2013 13:50:54 -0500 |
parents | 47bc9800972c |
children | cb75b67f04fb |
files | make/bsd/makefiles/gcc.make make/linux/makefiles/gcc.make make/solaris/makefiles/gcc.make |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make Wed Mar 06 13:46:55 2013 -0500 +++ b/make/bsd/makefiles/gcc.make Wed Mar 06 13:50:54 2013 -0500 @@ -168,12 +168,12 @@ # conversions which might affect the values. To avoid that, we need to turn # it off explicitly. ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" -ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare +WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef else -ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare +WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef endif -CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) +CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) # Special cases CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) # XXXDARWIN: for _dyld_bind_fully_image_containing_address
--- a/make/linux/makefiles/gcc.make Wed Mar 06 13:46:55 2013 -0500 +++ b/make/linux/makefiles/gcc.make Wed Mar 06 13:50:54 2013 -0500 @@ -131,12 +131,12 @@ # conversions which might affect the values. To avoid that, we need to turn # it off explicitly. ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" -ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare +WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef else -ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare +WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef endif -CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) +CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) # Special cases CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
--- a/make/solaris/makefiles/gcc.make Wed Mar 06 13:46:55 2013 -0500 +++ b/make/solaris/makefiles/gcc.make Wed Mar 06 13:50:54 2013 -0500 @@ -118,8 +118,8 @@ # Compiler warnings are treated as errors WARNINGS_ARE_ERRORS = -Werror # Enable these warnings. See 'info gcc' about details on these options -ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare -CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) +WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef +CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) # Special cases CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))