This is the mail archive of the
mailing list for the GCC project.
Re: cpplib bug fix (macro expansion)
- To: Zack Weinberg <zack at rabi dot columbia dot edu>
- Subject: Re: cpplib bug fix (macro expansion)
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Wed, 30 Sep 1998 14:48:23 -0400
- CC: egcs-patches at cygnus dot com
- Organization: Cygnus Solutions Canada Ltd
- References: <199809292312.TAA05034@rabi.phys.columbia.edu>
Zack Weinberg wrote:
> The comment problem should be easy to fix, but I'm not sure about the rest.
> is_hor_space won't work: consider
> #define F(a) a
You're right....my mistake.
> To avoid collapsing spaces, it would have to be possible to return to a
> marker after having popped an arbitrary number of macro buffers off the
> stack, or else I'd need a scratch area to save all the spaces in. Either
> would be difficult.
You don't need to preserve the spaces in the macro buffers, just in the source
file buffer. That's why the mark is set after the macro buffers are all popped
off the stack. I think a combination of the existing mark/return scheme and
something to note spaces in the macro buffers is in order.