cpp bug
Zack Weinberg
zack@wolery.cumb.org
Fri Apr 7 12:30:00 GMT 2000
On Fri, Apr 07, 2000 at 12:34:32PM -0600, Tom Tromey wrote:
> Today I noticed that the current cvs gcc won't build itself on my
> Linux box. After some investigation I traced it down to a bug in the
> preprocessor.
>
> Consider the appended files.
> Currently I get this:
>
> creche. gcc -c m.c
> m.c: In function `main':
> m.c:6: `x' undeclared (first use in this function)
> m.c:6: (Each undeclared identifier is reported only once
> m.c:6: for each function it appears in.)
Thanks for reporting this. Richard Henderson saw the same thing but I
didn't have enough context to reproduce the bug.
This is caused by overly eager multiple-include optimization. I
didn't see it because the timebits.h (now bits/time.h) with glibc 2.1
works differently.
I'm testing a patch right now - the gist of it is to add
pfile->only_seen_white = 0;
at the beginning of skip_if_group.
zw
More information about the Gcc-bugs
mailing list