[Bug c/49655] New: diagnostic pragma accepts non-warning options
jsm28 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 5 22:54:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list