https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118458
Bug ID: 118458 Summary: No mechanism to disable all warnings locally (supported by Clang with diagnostic ignored "-Weverything") Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: stephenberry.developer at gmail dot com Target Milestone: --- With Clang it is possible to locally disable all warnings where they may be invalid or unhelpful: #pragma clang diagnostic push #pragma clang diagnostic ignored "-Weverything" // ... Code here for which we want to disable warnings #pragma clang diagnostic pop It is extremely helpful to be able to enable -Wall and -Werror on codebases, to ensure all warnings are handled by developers. However, there are some corner cases where the compiler may issue a warning that the developer cannot fix or for which there is no issue and the code is 100% standard compliant. I develop the C++ Glaze library and this issue prevents users from enabling -Werror, because I have no means of disabling some warnings with GCC. On Clang, myself and other developers can use -Werror, because it is possible to disable warnings where they are rightly ignored. It would be wonderful for GCC to add support for: diagnostic ignored "-Weverything" Thanks for your consideration, Stephen