diff options
author | brian-intuit <brian-intuit@users.noreply.github.com> | 2017-05-23 10:32:01 -0700 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2017-05-23 13:32:01 -0400 |
commit | d49d04d53abe6b3c026275b94f41a1612f67c85d (patch) | |
tree | 6f74751a72407b2ca2ff07ade069f2e863fb174f | |
parent | 4ae69e6f0b0072e3bffd65a5b4d43ee32f9c4aa6 (diff) |
Added -Wreserved-id-macro and but exclude existing nonconforming macros (#141)
Added -Wreserved-id-macro and but exclude existing nonconforming macros
-rw-r--r-- | GTMDefines.h | 6 | ||||
-rw-r--r-- | XcodeConfig/subconfig/General.xcconfig | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/GTMDefines.h b/GTMDefines.h index 8ec88cc..7feb1cb 100644 --- a/GTMDefines.h +++ b/GTMDefines.h @@ -109,6 +109,10 @@ // been placed in. // +// Ignore the "Macro name is a reserved identifier" warning in this section +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" + // We only define the simple macros if nothing else has defined this. #ifndef _GTMDevLog @@ -170,6 +174,8 @@ #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) #endif // _GTMCompileAssert +#pragma clang diagnostic pop + // ---------------------------------------------------------------------------- // CPP symbols defined based on the project settings so the GTM code has // simple things to test against w/o scattering the knowledge of project diff --git a/XcodeConfig/subconfig/General.xcconfig b/XcodeConfig/subconfig/General.xcconfig index 781c414..a62dcf6 100644 --- a/XcodeConfig/subconfig/General.xcconfig +++ b/XcodeConfig/subconfig/General.xcconfig @@ -117,7 +117,7 @@ GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64] = YES // same selector rendering this mostly useless to us // C Only Warnings -GTM_GENERAL_OTHER_CFLAGS = -Wdiv-by-zero -Wbad-function-cast -Wnested-externs -Wold-style-definition +GTM_GENERAL_OTHER_CFLAGS = -Wreserved-id-macro -Wdiv-by-zero -Wbad-function-cast -Wnested-externs -Wold-style-definition // C++ Only Warnings GTM_GENERAL_OTHER_CPLUSPLUSFLAGS = -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo |