comparison make/bsd/makefiles/gcc.make @ 14229:d16be2b85802

8022263: use same Clang warnings on BSD as on Linux Reviewed-by: kvn, iveresov
author twisti
date Tue, 07 Jan 2014 14:26:12 -0800
parents f509b8f4699b
children b6ab2c9abfc5
comparison
equal deleted inserted replaced
14228:e045e1876610 14229:d16be2b85802
258 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare 258 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
259 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess 259 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
260 WARNINGS_ARE_ERRORS += -Wno-empty-body 260 WARNINGS_ARE_ERRORS += -Wno-empty-body
261 endif 261 endif
262 262
263 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef 263 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
264 264
265 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" 265 ifeq ($(USE_CLANG),)
266 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit 266 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
267 # conversions which might affect the values. Only enable it in earlier versions. 267 # conversions which might affect the values. Only enable it in earlier versions.
268 WARNING_FLAGS = -Wunused-function 268 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
269 ifeq ($(USE_CLANG),) 269 WARNINGS_FLAGS += -Wconversion
270 WARNING_FLAGS += -Wconversion
271 endif 270 endif
272 endif 271 endif
273 272
274 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) 273 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
275 # Special cases 274 # Special cases