disable a GCC warning with CPP11=1 (nw)

also moved clang C++11 warning supression into CPP11 define
This commit is contained in:
Oliver Stöneberg 2015-02-05 15:38:41 +01:00
parent 6790ff2ebd
commit f303a5c155
2 changed files with 8 additions and 2 deletions

View File

@ -23,6 +23,10 @@ ifneq (,$(findstring memory,$(SANITIZE)))
CCOMFLAGS += -fsanitize-memory-track-origins -fPIE
endif
ifdef CPP11
CCOMFLAGS += -Wno-deprecated-register -Wno-reserved-user-defined-literal -Wno-c++11-narrowing
endif
# TODO: needs to use $(CC)
TEST_CLANG := $(shell clang --version)
@ -32,8 +36,6 @@ endif
ifeq ($(findstring 3.5,$(TEST_CLANG)),3.5)
CCOMFLAGS += -Wno-inline-new-delete
# these show up when compiling as c++11
CCOMFLAGS += -Wno-deprecated-register -Wno-reserved-user-defined-literal -Wno-c++11-narrowing
# caused by src/mess/drivers/x07.c, src/osd/sdl/window.c, src/emu/sound/disc_mth.inc, src/mame/video/chihiro.c
CCOMFLAGS += -Wno-absolute-value

View File

@ -1,6 +1,10 @@
# TODO: needs to use $(CC)
TEST_GCC := $(shell gcc --version)
ifdef CPP11
CPPONLYFLAGS += -Wno-literal-suffix
endif
ifeq ($(findstring 4.7.,$(TEST_GCC)),4.7.)
CCOMFLAGS += -Wno-narrowing -Wno-attributes
endif