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: unassig...@gcc.gnu.org
        ReportedBy: js...@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.

Reply via email to