preprocessor/7022: #line in .i files is broken in gcc 3.1
Neil Booth
neil@daikokuya.demon.co.uk
Thu Jun 13 14:43:00 GMT 2002
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.
More information about the Gcc-bugs
mailing list