comparison make/linux/makefiles/gcc.make @ 14368:b6ab2c9abfc5

8030350: Enable additional compiler warnings for GCC Reviewed-by: dholmes, coleenp, erikj, tbell, ihse
author mduigou
date Wed, 12 Feb 2014 09:37:18 -0800
parents f2512d89ad0c
children 28f281e8de1d
comparison
equal deleted inserted replaced
14366:7907932bdd99 14368:b6ab2c9abfc5
212 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare 212 WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
213 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess 213 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
214 WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body 214 WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
215 endif 215 endif
216 216
217 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value 217 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wno-error=format-nonliteral
218 218
219 ifeq ($(USE_CLANG),) 219 ifeq ($(USE_CLANG),)
220 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit 220 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
221 # conversions which might affect the values. Only enable it in earlier versions. 221 # conversions which might affect the values. Only enable it in earlier versions.
222 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" 222 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"