OSDN Git Service

2007-09-10 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Sep 2007 12:09:17 +0000 (12:09 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Sep 2007 12:09:17 +0000 (12:09 +0000)
PR fortran/31547
* gfortran.texi: Document when CPP is called.

* intrinsic.texi (IOR): Fix typos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128331 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/gfortran.texi
gcc/fortran/intrinsic.texi

index 8157e00..a3a1263 100644 (file)
@@ -1,3 +1,10 @@
+2007-09-08  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/31547
+       * gfortran.texi: Document when CPP is called.
+
+       * intrinsic.texi (IOR): Fix typos.
+
 2007-09-10  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/33370
index 1125326..73ddcb0 100644 (file)
@@ -225,6 +225,7 @@ or alternative to, the unix @command{f95} command;
 @menu
 * About GNU Fortran::    What you should know about the GNU Fortran compiler.
 * GNU Fortran and GCC::  You can compile Fortran, C, or other programs.
+* Preprocessing and conditional compilation:: The Fortran preprocessor
 * GNU Fortran and G77::  Why we chose to start from scratch.
 * Project Status::       Status of GNU Fortran, roadmap, proposed extensions.
 * Standards::           Standards supported by GNU Fortran.
@@ -382,6 +383,39 @@ Fortran compiler.
 
 
 @c ---------------------------------------------------------------------
+@c Preprocessing and conditional compilation
+@c ---------------------------------------------------------------------
+
+@node Preprocessing and conditional compilation
+@section Preprocessing and conditional compilation
+@cindex CPP
+@cindex FPP
+@cindex Conditional compilation
+@cindex Preprocessing
+
+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. On systems with
+case-preserving file names, the preprocessor is automatically invoked if the
+file extension is @code{.F}, @code{.F90}, @code{.F95} or @code{.F03};
+otherwise use for fixed-format code the option @code{-x f77-cpp-input}
+and for free-format code @code{-x f95-cpp-input}. Invocation of the
+preprocessor can be suppressed using @code{-x f77} or @code{-x f95}.
+
+If the GNU Fortran invoked 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. See @ref{Top,,Overview,cpp,The C Preprocessor} for details.
+
+While CPP is the de-facto standard for preprocessing Fortran code,
+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. You can use the program coco
+to preprocess such files (@uref{http://users.erols.com/dnagle/coco.html}).
+
+
+@c ---------------------------------------------------------------------
 @c GNU Fortran and G77
 @c ---------------------------------------------------------------------
 
index 6c97d52..8b0580b 100644 (file)
@@ -5799,7 +5799,7 @@ The return value is a @code{INTEGER(8)} variable.
 
 @table @asis
 @item @emph{Description}:
-@code{IEOR} returns the bitwise boolean OR of @var{I} and
+@code{IOR} returns the bitwise boolean inclusive-OR of @var{I} and
 @var{J}.
 
 @item @emph{Standard}:
@@ -5809,7 +5809,7 @@ F95 and later
 Elemental function
 
 @item @emph{Syntax}:
-@code{RESULT = IEOR(I, J)}
+@code{RESULT = IOR(I, J)}
 
 @item @emph{Arguments}:
 @multitable @columnfractions .15 .70