Skip to content

Commit e4cef80

Browse files
derekmaurocopybara-github
authored andcommitted
internal/any_invocable: Remove suppresion of false positive -Wmaybe-uninitialized on GCC 12
These don't seem to be a problem ever since we switched from SFINAE to `if constexpr`. PiperOrigin-RevId: 728221117 Change-Id: I26f03ac6e0bed6670e6274c68327274978b2b095
1 parent a782d5c commit e4cef80

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

absl/functional/internal/any_invocable.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,7 @@ ReturnType InvokeR(F&& f, P&&... args) {
119119
if constexpr (std::is_void_v<ReturnType>) {
120120
std::invoke(std::forward<F>(f), std::forward<P>(args)...);
121121
} else {
122-
// GCC 12 has a false-positive -Wmaybe-uninitialized warning here.
123-
#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
124-
#pragma GCC diagnostic push
125-
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
126-
#endif
127122
return std::invoke(std::forward<F>(f), std::forward<P>(args)...);
128-
#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
129-
#pragma GCC diagnostic pop
130-
#endif
131123
}
132124
}
133125

0 commit comments

Comments
 (0)