This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: your recent patch to cpplib.c
On Tue, Feb 08, 2000 at 05:12:59PM -0800, Mark Mitchell wrote:
>
> I didn't see a gcc-patches message for this:
>
> I apologize for that. Our mail server was very badly behaved
> yesterday -- it dropped outgoing mail without telling me! I'm still
> trying to figure out who got what.
Ah, that would explain it. Thanks for clarifying.
> I posted a test-case with the bug. It was, I belive:
>
> #define f(x) x
> void g() {
> f
> (3);
> }
>
> The CPP output compressed `g' to one line.
Right. Contrariwise, consider
#define f(x) x
void g() {
(f
)(3);
}
That will come out with an extra line with your patch, but not the way
it used to be.
> The right fix is not to use the mark at all in this context. It's
> supposed to be for lookahead under extremely limited circumstances and
> this isn't one of them. (And it will probably vanish entirely in the
> parser rewrite.)
>
> On the other hand, congratulations; you have probably found the line
> numbering bug I've been looking for for months.
>
> Well, that's something. I apologize for the bogus fix. What should
> we do at this point?
>
> I've not got the time to do the complete fix, I don't think. But, I
> can certainly back out my change, or we can leave it in. Let me know
> what you would like.
Let's leave it in. The bug is now in the rarer case, which is better
than nothing. I'm working on a patch that will fix this as a side
effect, but it touches a bunch of other code and needs more testing
before I can publish it.
> And thanks for explaining this.
No problem.
zw