This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug in preprocessor
Alexandre Oliva wrote:
> On Nov 1, 1999, "Jeffrey L. Copeland" <copeland@alumni.caltech.edu> wrote:
>
> > Certainly the code inside the #ifdef isn't intended to be compiled
>
> But it is supposed to be tokenized, and it doesn't contain valid C
> tokens. The program is in error, but gcc might be less restrictive
> about it. Zack Weinberg has just suggested that he might accept it
> with just a warning, if the source was not C. Maybe it should be
> accepted with warnings even in plain C... Zack?
Maybe. The difficulty is in deciding what to do after warning. Continue
to parse as a string? Abort string processing at end of line? Either one
is likely to be wrong in some contexts. If you've issued a hard error the
point is moot, and in non-C source I will probably disable single-quote
string processing entirely.
iso646.h is a better solution to Mr. Copeland's problem, anyway.
zw