https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118458
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2025-01-14
Ever confirmed|0 |1
Keywords| |diagnostic
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=66918
Status|UNCONFIRMED |NEW
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC has -w to disable all warnings but there's no corresponding "-W" that is
strictly the negative of it and thus could be specified with #pragma
diagnostic.
Besides getting all diagnostics a corresponding Warning option making '-w'
accessible in #pragma diagnostic might be useful. For the purpose of
singling out diagnostics without option (aka with option ID zero), naming
those -Wother might be an interesting workaround.
#pragma GCC diagnostic ignored "-Wother"
would then not correspond to -w but just disable all diagnostics not
associated with any option. We'd disallow -Wother, only allow
-Wno-other or use in the #pragma.
It's of course better to assign meaningful options to all diagnostics.