This is the mail archive of the gcc@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: Slight oddness with new preproc


Donn Terry wrote:-

> Given a macro invocation where the macro is one line,
> and the invocation is several lines, different versions
> of the preprocessof give slightly different results
> when using --save-temps.

...

> With an older preprocessor, the result of the macro
> expansion appears on the line corresponding to the
> last line of the multi-line call (in the .i file).
> 
> With the newer preprocessor, the result is on the first
> corresponding line.

Yes, we fixed a "bug" in the old one.  The standard strongly implies
it should all be on the same line as the initial invocation.

In many ways the output of the new preprocessor is prettier than the
old one - all the excess spacing is gone, so the preprocessed output
looks much more like the input file.  There's still long sequences of
> 8 newlines, though, which shouldn't exist.

This will be fixed along with excess #lines during expansion of
complex macros soon (see Jamie Lokier's thread about subtle bugs in
the macro expander).

> I don't see how this might matter in any real way, but in
> case it somehow does, it's worth noting.

I doubt it matters to almost anyone.

Neil.

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