This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
R: missing terminating ' character
- From: Alessandro Pellegrini <alessandro dot pellegrini at tin dot it>
- To: <hariharans at picochip dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 18 Nov 2008 18:35:13 +0100 (GMT+01:00)
- Subject: R: missing terminating ' character
- Reply-to: Alessandro Pellegrini <alessandro dot pellegrini at tin dot it>
>Please clarify if this is a bug.
It is not.
Preprocessor is mostly a
parser, so what you write has to match the syntax rules it works upon.
Since in preprocessor commands you can specify strings (for example in
#error or #waring), preprocessor still parses the apostrophes.
To be
more clear, a parser gives no sematic interpretation to what you write.
I mean, the parser won't understand that #if 0 means that you want to
discard what you are going to write afterwards. He just "reads" it,
demanding to a second phase further processing.
So, you were expecting
a behaviour like "since I found #if 0, I am not going to consider
anything until #endif". But that's not the way a parser works like...
Regards,
Alessandro