This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/49655] New: diagnostic pragma accepts non-warning options
- From: "jsm28 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 5 Jul 2011 22:53:54 +0000
- Subject: [Bug c/49655] New: diagnostic pragma accepts non-warning options
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49655
Summary: diagnostic pragma accepts non-warning options
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jsm28@gcc.gnu.org
#pragma GCC diagnostic accepts any option, not just warning options. Code such
as
#pragma GCC diagnostic error "-fstrict-aliasing"
should be rejected (but isn't at present), and it's probably possible to
trigger ICEs with such code at present by changing options at this point and
bypassing all the consistency checks and post-option processing done on the
command line.