Commit 0a529cfc by Derek Mauro Committed by Copybara-Service

Fix error in GCC warning suppression

PiperOrigin-RevId: 571347014
Change-Id: I716ca435128081f0e9b0434143103df579256f50
parent 4176cd25
...@@ -215,8 +215,8 @@ T& ObjectInLocalStorage(TypeErasedState* const state) { ...@@ -215,8 +215,8 @@ T& ObjectInLocalStorage(TypeErasedState* const state) {
// behavior, which works as intended on Abseil's officially supported // behavior, which works as intended on Abseil's officially supported
// platforms as of Q2 2022. // platforms as of Q2 2022.
#if !defined(__clang__) && defined(__GNUC__) #if !defined(__clang__) && defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif #endif
return *reinterpret_cast<T*>(&state->storage); return *reinterpret_cast<T*>(&state->storage);
#if !defined(__clang__) && defined(__GNUC__) #if !defined(__clang__) && defined(__GNUC__)
...@@ -526,10 +526,10 @@ class CoreImpl { ...@@ -526,10 +526,10 @@ class CoreImpl {
// Since this is template-heavy code, we prefer to disable these warnings // Since this is template-heavy code, we prefer to disable these warnings
// locally instead of adding yet another overload of this function. // locally instead of adding yet another overload of this function.
#if !defined(__clang__) && defined(__GNUC__) #if !defined(__clang__) && defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Waddress" #pragma GCC diagnostic ignored "-Waddress"
#pragma GCC diagnostic ignored "-Wnonnull-compare" #pragma GCC diagnostic ignored "-Wnonnull-compare"
#pragma GCC diagnostic push
#endif #endif
if (static_cast<RemoveCVRef<QualDecayedTRef>>(f) == nullptr) { if (static_cast<RemoveCVRef<QualDecayedTRef>>(f) == nullptr) {
#if !defined(__clang__) && defined(__GNUC__) #if !defined(__clang__) && defined(__GNUC__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment