This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/7022: #line in .i files is broken in gcc 3.1
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: ted at arraycomm dot com
- Cc: gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Jun 2002 21:31:14 +0100
- Subject: Re: preprocessor/7022: #line in .i files is broken in gcc 3.1
- References: <20020613192919.22813.qmail@sources.redhat.com>
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.