aboutsummaryrefslogtreecommitdiff
path: root/absl/functional
diff options
context:
space:
mode:
authorDerek Mauro <dmauro@google.com>2023-10-06 08:40:01 -0700
committerCopybara-Service <copybara-worker@google.com>2023-10-06 08:40:53 -0700
commit0a529cfc5e419cb45aa83351ce20301213b8877c (patch)
tree2939c33db0c761c54939525d5f27d90be2eab0e1 /absl/functional
parent4176cd2571dfd54dd3c27f0fc0edc138a6a8be05 (diff)
downloadabseil-0a529cfc5e419cb45aa83351ce20301213b8877c.tar.gz
abseil-0a529cfc5e419cb45aa83351ce20301213b8877c.tar.bz2
abseil-0a529cfc5e419cb45aa83351ce20301213b8877c.zip
Fix error in GCC warning suppression
PiperOrigin-RevId: 571347014 Change-Id: I716ca435128081f0e9b0434143103df579256f50
Diffstat (limited to 'absl/functional')
-rw-r--r--absl/functional/internal/any_invocable.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/functional/internal/any_invocable.h b/absl/functional/internal/any_invocable.h
index f096bb02..b04436d1 100644
--- a/absl/functional/internal/any_invocable.h
+++ b/absl/functional/internal/any_invocable.h
@@ -215,8 +215,8 @@ T& ObjectInLocalStorage(TypeErasedState* const state) {
// behavior, which works as intended on Abseil's officially supported
// platforms as of Q2 2022.
#if !defined(__clang__) && defined(__GNUC__)
-#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif
return *reinterpret_cast<T*>(&state->storage);
#if !defined(__clang__) && defined(__GNUC__)
@@ -526,10 +526,10 @@ class CoreImpl {
// Since this is template-heavy code, we prefer to disable these warnings
// locally instead of adding yet another overload of this function.
#if !defined(__clang__) && defined(__GNUC__)
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Waddress"
#pragma GCC diagnostic ignored "-Wnonnull-compare"
-#pragma GCC diagnostic push
#endif
if (static_cast<RemoveCVRef<QualDecayedTRef>>(f) == nullptr) {
#if !defined(__clang__) && defined(__GNUC__)