[Bug c/63326] whether a #pragma is a statement depends on the type of pragma

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 22 09:12:00 GMT 2014


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.



More information about the Gcc-bugs mailing list