[Bug preprocessor/30786] [4.1/4.2/4.3 Regression] ICE on _Pragma at end of file
tromey at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Aug 19 18:55:00 GMT 2007
------- Comment #6 from tromey at gcc dot gnu dot org 2007-08-19 18:54 -------
What does a plain "_Pragma" mean?
Currently we try to give an error for this. However, it is not clear that
this is actually erroneous. The copy of the standard that I am reading
only mentions:
A unary operator expression of the form:
_Pragma ( string-literal )
... but a plain _Pragma does not have that form.
I'm not even sure that _Pragma(something-other-than-string-literal)
should be recognized (but I'm new to C standardese...)
Perhaps I have the wrong version of the standard or perhaps there
is some more recent development of which I'm unaware.
Anyway if we assume that a plain _Pragma is not an error then the first
patch here is close to the correct one -- it just returns the plain
_Pragma to the FE as an identifier. If all forms other than the
full form are unrecognized then I think this first patch is correct.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30786
More information about the Gcc-bugs
mailing list