From da9ac3ce7469cab8c4650e3be00fa8de381a9b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 23 Sep 2014 08:46:14 +0000 Subject: [PATCH] documented some disabled clang compiler warnings / re-enabled -Wformat-security for clang 3.5 (was disabled because of a bug in clang) / disabled c++11 warnings so it compiles out-of-the-box / added TODO (nw) --- src/build/flags_clang.mak | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/build/flags_clang.mak b/src/build/flags_clang.mak index 998338b7a85..58f78d07541 100644 --- a/src/build/flags_clang.mak +++ b/src/build/flags_clang.mak @@ -1,11 +1,14 @@ -# TODO: some of these are no longer necessary for newer clang versions - re-enable them CCOMFLAGS += \ -Wno-cast-align \ -Wno-tautological-compare \ -Wno-constant-logical-operand \ - -Wno-format-security \ - -Wno-shift-count-overflow \ - -Wno-self-assign-field + -Wno-format-security + +# caused by obj/sdl64d/emu/cpu/tms57002/tms57002.inc +CCOMFLAGS += -Wno-self-assign-field + +# caused by src/emu/cpu/tms34010/34010gfx.c +CCOMFLAGS += -Wno-shift-count-overflow # TODO: needs to use $(CC) TEST_CLANG := $(shell clang --version) @@ -16,7 +19,12 @@ endif ifeq ($(findstring 3.5,$(TEST_CLANG)),3.5) CCOMFLAGS += -Wno-inline-new-delete -Wno-absolute-value -Wno-dynamic-class-memaccess -# XCode 6.0.1 is built on a pre-release SVN version of clang 3.5, that doesn't support -Wno-absolute-value yet - so ignore that warning for now +# these were disabled because of bugs in older clang versions +CCOMFLAGS += -Wformat-security +# these show up when compiling as c++11 +CCOMFLAGS += -Wno-deprecated-register -Wno-reserved-user-defined-literal -Wno-c++11-narrowing +# TODO: add proper detection of XCode 6.0.1 +# XCode 6.0.1 is built on a pre-release SVN version of clang 3.5, that doesn't support -Wno-absolute-value yet CCOMFLAGS += -Wno-unknown-warning-option # XCode 6.0.1 gives this when using SDL2 in /Library/Frameworks/SDL2.framework/Headers/SDL_syswm.h:150 included from src/osd/sdl/sdlinc.h CCOMFLAGS += -Wno-extern-c-compat