summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-10 12:09:17 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-10 12:09:17 +0000
commit980dd81f262d5ba82861734f1f62045273126a92 (patch)
tree1e02ee233e859fc45be42e0903c2490225a70667 /gcc
parent53d95cf300a9c20e5bc88aa2a1497df1d0a776e5 (diff)
downloadgcc-980dd81f262d5ba82861734f1f62045273126a92.tar.gz
2007-09-10 Tobias Burnus <burnus@net-b.de>
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/gfortran.texi34
-rw-r--r--gcc/fortran/intrinsic.texi4
3 files changed, 43 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 8157e00e7cd..a3a1263e946 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 1125326235a..73ddcb0373a 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -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 ---------------------------------------------------------------------
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 6c97d5263a3..8b0580bad88 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -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