This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

Re: preprocessor/7022: #line in .i files is broken in gcc 3.1


ted@arraycomm.com wrote:-

> I think there are two areas in the source code that need a
> fix.  Most importantly, there is some problem with generic
> #line handling that i have not figured out.
> Secondarily, there is code to peek at the first line of a
> file for a # <number> directive, which is clearly broken
> since it does not check for #line ... if this never
> got fixed it would be no big deal.

That code is deliberate too.  Remember that the .i file is
really just a contract between the preprocessor and the compiler,
whose semantics and format need not be documented, and do change
subtly from time to time.

The compiler expects to see a # <NUM> line at the beginning
of a file to tell it what the original file was.  The preprocessor
doesn't output #line, so there is no check for it.

Neil.


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