R: missing terminating ' character

Alessandro Pellegrini alessandro.pellegrini@tin.it
Tue Nov 18 19:07:00 GMT 2008


>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



More information about the Gcc-help mailing list