This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor bug: @ + MACRO does not work in gcc-3.0
Zack Weinberg wrote:-
> I agree with you that (2) is a bad solution. However, I don't like
> (1) either. It is a major quiet change to the semantics of Objective
> C. I have no way of evaluating how widespread this sort of thing is,
> so I'm going to be really conservative.
>
> Also, looking at cpplex.c and c-parse.in, I think going for (3) might
> actually simplify the code. What do you think of the appended patch?
> With it, the preprocessor crunches Nicola's test case correctly.
> However, this only exposes another bug - see separate report.
Two things:
1) Is it a good idea to introduce yet another token type, when CPP_OTHER
would do (from what I can see)?
2) Don't you just drop stray @ tokens, in e.g.
int x = y @ + z;
without a diagnostic? (And what about in C?)
Neil.