https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63326
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, we already error out on OpenMP pragmas in such places, because the OpenMP standard requires that the pragmas aren't used in contexts where accepting them as statements or ignoring them would make a difference for parsing the function: "For C/C++, a stand-alone directive may not be used in place of the statement following an if, while, do, switch, or label. See Appendix B for the formal grammar." so for other pragmas we could use similar conditions.