[Bug preprocessor/12075] non-terminated quotes within #if'ed out text comments confuse preprocessor
ehrhardt at mathematik dot uni-ulm dot de
gcc-bugzilla@gcc.gnu.org
Wed Aug 27 09:54:00 GMT 2003
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
More information about the Gcc-bugs
mailing list