This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: get -traditional correct outside directives
On Tue, May 16, 2000 at 08:05:11PM +0900, Neil Booth wrote:
> Zack Weinberg wrote:-
>
> > I'd rather this was done some other way, such as by moving all the
> > code at do_parse_string inside parse_string2 and passing in the 'cur'
> > pointer and the entire current token. Have it return the new current
> > position. Then use 'cur' in the call to trigraph_replace.
>
> But cur points to the (possibly mmapped read-only) input buffer;
> trigraph replace operates on the copied string.
Argh, I misunderstood. The principle stands, though - find a
read-write pointer to the same block of memory. And I think moving
the code at do_parse_string inside parse_string2 would be a good idea
just on general principle.
zw