This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/52561] GCC is not throwing error if only one character '#' is written in a line.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Mar 2012 11:42:08 +0000
- Subject: [Bug preprocessor/52561] GCC is not throwing error if only one character '#' is written in a line.
- Auto-submitted: auto-generated
- References: <bug-52561-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52561
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |preprocessor
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-12 11:42:08 UTC ---
The C++ standard clearly says:
A preprocessing directive of the form
# new-line
has no effect.
It also allows the second form, which matches this in the grammar:
# non-directive