This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CPP outputs wrong number of newlines sometimes


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]