From c8a440dfb68074ff310e624928cd2dd61c101728 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Wed, 25 May 2016 13:46:00 -0400 Subject: Add more warnings to for the ObjC runtime build Working on https://github.com/google/protobuf/issues/1599, specifically: - Turn on more warnings that the Xcode UI calls out with individual controls. - Manually add: -Wundef -Wswitch-enum - Manually add and then diable in the unittests because of XCTest's headers: -Wreserved-id-macro -Wdocumentation-unknown-command - Manually add -Wdirect-ivar-access, but disable it for the unittests and in the library code (via #pragmas to suppress it). This is done so proto users can enable the warning. --- objectivec/GPBBootstrap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'objectivec/GPBBootstrap.h') diff --git a/objectivec/GPBBootstrap.h b/objectivec/GPBBootstrap.h index ffefa770..4db08e80 100644 --- a/objectivec/GPBBootstrap.h +++ b/objectivec/GPBBootstrap.h @@ -48,7 +48,7 @@ // doesn't allow us to forward declare. We work around this one case by // providing a local definition. The default case has to use NS_ENUM for the // magic that is Swift bridging of enums. -#if (__cplusplus && __cplusplus < 201103L) +#if (defined(__cplusplus) && __cplusplus && __cplusplus < 201103L) #define GPB_ENUM(X) enum X : int32_t X; enum X : int32_t #else #define GPB_ENUM(X) NS_ENUM(int32_t, X) -- cgit v1.2.3