This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/12075] non-terminated quotes within #if'ed out text comments confuse preprocessor
- From: "ehrhardt at mathematik dot uni-ulm dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2003 09:54:43 -0000
- Subject: [Bug preprocessor/12075] non-terminated quotes within #if'ed out text comments confuse preprocessor
- References: <20030827091358.12075.andi@lisas.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12075
ehrhardt at mathematik dot uni-ulm dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From ehrhardt at mathematik dot uni-ulm dot de 2003-08-27 09:54 -------
Decomposing a file into preprocessing tokens is translations phase 3.
Preprocessing directives are executed in translation phase 4. This
means that even if text is skipped via #if 0 it must be a sequence of
preprocessing tokens.
In your example the double quote can not start a string constant
because a string constant must not contain a newline character (6.4.5[1]).
Note: This was accepted by older versions of gcc as an extension.
Hence the dobule quote character must be a preprocessing token of its own.
This invokes undefined behaviour (6.4[3]).
regards Christian