This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CPP outputs wrong number of newlines sometimes
- To: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Subject: Re: CPP outputs wrong number of newlines sometimes
- From: Neil Booth <NeilB at earthling dot net>
- Date: Mon, 25 Sep 2000 22:29:25 +0100
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <20000925215910.A16849@pcep-jamie.cern.ch> <20000925222601.A17041@pcep-jamie.cern.ch>
Hi Jamie,
Could you send the bugs to gcc-bugs?
Jamie Lokier wrote:-
> > The line number is not properly maintained when the multi-line string is
> > printed. Something similar happens with multi-line comments when -C is
> > used.
Thanks for spotting that.
> Patch attached. Let me know if it's useful (I haven't yet signed papers).
Probably. I'd rather not scan the string / comment again,
particularly if we're moving towards multibyte char support. It might
be better to somehow record the number of lines involved when lexing
these tokens. That would be easy (just the difference between
buffer->lineno before and after the relevant function call); finding
the place to store that info would be harder. Don't you just love GNU
extensions? <g>
Maybe you could get the paperwork done anyway. I'm sure it'd be
useful for the future.
Thanks,
Neil.