This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/30786] [4.1/4.2/4.3 Regression] ICE on _Pragma at end of file
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2007 18:54:40 -0000
- Subject: [Bug preprocessor/30786] [4.1/4.2/4.3 Regression] ICE on _Pragma at end of file
- References: <bug-30786-9631@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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