This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, Patch] PR31547 - Document when gfortran runs the preprocessor
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 8 Sep 2007 23:56:16 +0200 (CEST)
- Subject: Re: [Fortran, Patch] PR31547 - Document when gfortran runs the preprocessor
- References: <46E2AAA6.90002@net-b.de> <46E2ACEC.1090906@net-b.de>
Index: gfortran.texi
===================================================================
+Many Fortran compilers including GNU Fortran allow to pass the source code
+through a C preprocessor (CPP; sometimes also called Fortran preprocessor,
+fpp) to allow for conditional compilation. In case of GNU Fortran
+this is the GNU C Preprocessor in the traditional mode.
In @cindex you had FPP (all uppercase); want to make this consistent?
+On systems with
+case-sensitive file names, the preprocessor is automatically invoked if the
+file extension is @code{.F}, @code{.F90}, @code{.F95} or @code{.F03};
Is this only the case for case-sensitive file systems (where x.f and x.F
are two different files) or also for case-preserving file systems (where
the file name can be written as x.f or x.F)?
+otherwise use for fixed-format code the option @code{-x f77-cpp-input}
+and for free-format code @code{-x f95-cpp-input}. The calling of the
+preprocessor can be suppressed using @code{-x f77} and @code{-x f95}.
I believe this might sound better as "the option...for ...-format code".
How about "Use of the the preprocessor" or "Invocation..."?
+If the GNU Fortran invoked called the preprocessor, @code{__GFORTRAN__}
+is defined and @code{__GNUC__}, @code{__GNUC_MINOR__} and
+@code{__GNUC_PATCHLEVEL__} can be used to determine the version of the
+compiler.
"invoked" or "called", but not both. ;-)
+While CPP is the de-facto standard, Part 3 of the Fortran 95 standard
+(ISO/IEC 1539-3:1998) defines Conditional Compilation, which is not
+widely used and not directly supported by the GNU Fortran compiler.
"de-facto standard for preprocessing Fortran code", perhaps?
+You can use the program coco to preprocess such files
@command{coco}?
Index: intrinsic.texi
===================================================================
--- intrinsic.texi (revision 128271)
+++ intrinsic.texi (working copy)
This is part of a different patch, I assume?
This patch is fine with me if you address the issue pointed out above.
According to the rules of Fortran-land you may need approval by a Fortran
maintainer, I'm not sure.
Gerald