This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -no-integrated-cpp flag
- From: "Ashif S. Harji" <asharji at plg2 dot math dot uwaterloo dot ca>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc at gcc dot gnu dot org, Ashif Harji <asharji at uwaterloo dot ca>, "Peter A. Buhr" <pabuhr at plg2 dot math dot uwaterloo dot ca>
- Date: Wed, 18 Dec 2002 12:58:00 -0500 (EST)
- Subject: Re: -no-integrated-cpp flag
Neil,
We are looking into producing a patch for the -no-integrated-cpp flag in
gcc-3.3 and we had a couple of questions.
1) The save-temps flag with respect to preprocessing is currently implemented
by invoking the preprocessor and compiler in two separate steps. Is this
behaviour to be maintained in future releases or is save-temps with respect
to preprocessing going to be integrated into the compiler?
2) Assuming that the save-temps with respect to preprocessing will continue to
be implemented using two steps, why is there a difference between the way it
is implemented in gcc versus g++ or objc?
In gcc, first preprocessing occurs by calling '(trad_capable_cpp)' and then
compiling occurs by calling 'cc1' with '-fpreprocessed' (see gcc.c for more
details).
In g++, preprocessing occurs by calling 'cc1plus' with the '-E' flag
and then compiling occurs by calling 'cc1plus' again, but this time
with '-fpreprocessed' (see cp/lang-specs.h for more details).
Similarly for objc.
Is there a reason why 'cpp' is not invoked to handle the preprocessing for
all three of the languages? That is, does the integrated cpp supply
functionality that is unavailable in the separate cpp, and that is need by
C++ and objc? Or is the separate cpp used by gcc soon to be replaced by
'cc1 -E'?
Once we know the answers to these questions, we can proceed with some
suggestions.
thanks,
ashif.
On Tue, 19 Nov 2002, Neil Booth wrote:
> Hi Ashif,
>
> Would you mind producing a patch for 3.3? After 3.3 we'll maintain
> it ourselves as part of the compiler I think. Most of the option
> rearranging has happened, and -traditional is now integrated too.
>
> Thanks,
>
> Neil.
>