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]

Re: Changes to gcc 3.x to invoke an external cpp


   > As the changes relate strictly to the command line interface, the testcases 
   > would simply invoke gcc/g++ with different combinations involving -zzzz-cpp,
   > -save-temps and -traditional.  I am not sure how to specify these types of
   > tests.  However, if you provide me with some guidance I can create some
   > testcases.

   We have discussed integrating the separate preprocessor cpp0 into the
   compiler completely; probably during 3.2 development.  It is also not
   inconceivable (I'd like to see it happen) that cpplib, once it is C99
   compliant, has the -traditional capability added to it, and then the
   separate traditional preprocessor would die too.

   In other words, in future it is reasonably likely that --save-temps, or a
   separate invocation of CPP, become the only way to get preprocessed source.

We don't have any problems with this nor do we need the -traditional capability
either. We included it for backwards compatibility reasons, i.e., because it
was there. The point to be made is that the presence of the --save-temps and
the separate CPP implies that 99% of the functionality that we need is going to
be in the compiler driver anyway. The only feature that is different from
--save-temps is not to save the temp, which we showed is handled by a small
"if" based on the --user-cpp (-zzzz-cpp) flag and the use of %g instead of %b.
Furthermore, the --user-cpp restores a feature previously present with the -B
flag. Finally, the --user-cpp has no affect on your goal of integrating the
preprocessor. It just allows others to use a non-integrated cpp if they want,
e.g., "m4", without having to write and maintain all the code to parse the
gcc/g++ command line arguments (2000-3000 lines of code). In addition, our
project has to run cpp first, because our translator has to see the same
text stream as the compiler. The -B flag is very powerful and very valuable.
It gives people like us the ability to quickly augment parts of gcc that are
impossible with other compilers. Please don't take this feature away!

    I think something like this is best kept in your local tree; and it
   certainly has no reason to be C++ specific.

This suggestion does not help us. When people ftp our software for use on their
UNIX/Linux systems, they already have a version of gcc installed, which does
not have our "local tree". Therefore, our software doesn't work. Furthermore,
it makes no sense for us to distribute 30M of gcc and build another version of
it on the local system because for a 100 character patch in the compiler
driver.

I really hope you will think about this again. It is very important to us.


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