https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92696
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-11-27 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Diagnostic pragmas only work reliably at namespace-scope, not within functions. I thought that was documented, but maybe it's just something I learnt the hard way.