Serious error-causing change in new CPP's -traditional behavior
Zack Weinberg
zack@wolery.cumb.org
Fri May 5 12:35:00 GMT 2000
On Thu, May 04, 2000 at 07:06:52PM -0700, Jason R Thorpe wrote:
> There is a change in new CPP's behavior when -traditional is used, which
> causes the NetBSD/i386 kernel build to fail. Not only is the behavior
> different than the CPP in EGCS 1.1.2, but it appears to be inconsistent
> with itself .. i.e. similar input is apparently processed differently
> when it should not be.
>
> The code that it actually chokes on is a large, complicated macro that
> generates interrupt stubs, but I have a simple test case that demonstrates
> the problem.
...
> GNU CPP version 2.96 20000504 (experimental) (cpplib)
> (NetBSD/i386 ELF)
>
> .globl Xresume666; Xresume666: ; cli ;Xintr 666: ; pushl $0
> Now, note that 20000504's CPP correctly concatenated `Xresume666'. Perhaps
> it has to do with the fact that comment characters are appearing within
> a macro argument, and thus take a different code path to comment elimination.
I agree this is a bug. The macro expander is being overhauled right
now, and we don't test -traditional mode much. Could you try to come
up with a test case in C, not assembly? Then it can be put into the
test suite.
This should be fixed within the next couple of weeks. I can't provide
an immediate patch, because the code is in flux.
zw
More information about the Gcc-bugs
mailing list