This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Serious error-causing change in new CPP's -traditional behavior
- To: Jason R Thorpe <thorpej at zembu dot com>
- Subject: Re: Serious error-causing change in new CPP's -traditional behavior
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Fri, 5 May 2000 12:34:56 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <20000504190651.A377@dr-evil.z.zembu.com>
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