1

How could I retrieve the intermediate files generated by the preprocessor, using GNU compiler?

I typically have Fortran sources that I compile with -x f95-cpp-input option for preprocessing, and I would like to retrieve the result. I tested different things, including using the -save-temps option (but the output is not really human-readable) and the -fdump-fortran-original option (that I found already too strongly modified by the compiler to be useful). I had a look in the GNU documentation, but could not find anything more useful.

Any hint would be appreciated!

MBR
  • 794
  • 13
  • 34

1 Answers1

4

Just use the -cpp -E and you have the result of the preprocessing in the standard output.

-E Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output.

Input files that don't require preprocessing are ignored.

(from man gcc)