This is the mail archive of the gcc-patches@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]

Integrated -save-temps mode (Re: MIPS SIZE_TYPE and PTRDIFF_TYPE revamp)


On Fri, Mar 08, 2002 at 05:09:53PM -0800, Eric Christopher wrote:
> 
> > > I really hate that this can't be built into the front end someway...
> > 
> > Help Neil and me out with integrated -save-temps mode, and it can be.
> 
> What needs to be done?

Sorry for the delay getting back to you.

The basic plan, given that we have people wanting the ability to
insert filters between cpp0 and cc1, is to make -E a special mode of
cc1.  Then, instead of invoking cpp0, saving the output, and feeding
it to cc1 -fpreprocessed, we'd invoke cc1 -E, save the output, and
feed it to cc1 -fpreprocessed.

What needs to be done... Take most of the code in cppmain.c and move
it back to cppoutput.c, (which used to exist and was deleted, oops)
which is part of libcpp.a.  Then modify c-lex.c's yyparse() routine so
that in -E mode it doesn't ever call yyparse_1, it just does the main
loop that's currently in cppmain.c.  Hack up the master specs to
match.  Then start replacing specs kludges with calls into libcpp from
the C front end.  (We'll need a post-options target hook which is used
for C/C++/ObjC only; see the #pragma registration logic for how to do
that.)

It doesn't sound that hard.  We'd be glad to take patches doing some
or all of this - it's definitely something we want to happen, but both
of us are too busy right now to sit down and code it.

zw


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