This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15726] New: no way to locally suppress a warning in part of a compunit
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2004 19:57:37 -0000
- Subject: [Bug c++/15726] New: no way to locally suppress a warning in part of a compunit
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
At least, none is mentioned in the manual. If one exists, it's a documentation bug. If not then it's a missing feature.
Many users have internal policy standards that require that all compilation use -Wall (and/or -Wextra) and that all warnings must be expunged from source code. Nevertheless, there are occasionally situations (such as compiler bugs, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15723) where a warning does not indicate a defect in the code and cannot be worked around or otherwise expunged.
In those situations there should be a way to explicitly annotate the source to suppress the gratuitous warning in the narrowest possible region, leaving the warning enabled in the rest of the compilation. In other compilers this capability is typically provided by pragmas, to which gcc is notoriously allergic. However done, it should exist and the capability should be described in the manual.
Ivan
--
Summary: no way to locally suppress a warning in part of a
compunit
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15726