http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59304

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to DJ Delorie from comment #2)
> Once found, we scan backwards through the array looking for #pragmas that
> might affect the diagnostic.  If we see one, that's what we use.  If we see
> a DK_POP code, we skip over the chunk of the array to the matching PUSH
> ([i].option), i.e. it's as if those actions never happened.

The problem is that those actions had an effect. In this testcase, the 

#pragma GCC diagnostic error "-Wswitch-enum"

enables the corresponding warn_switch_enum (which was not enabled in the
command-line). Skipping until the push does not disable it back.

Reply via email to