aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-09-28 03:14:40 +0000
committerJeff Law <law@gcc.gnu.org>1998-09-27 21:14:40 -0600
commitfcce57564b63a66c86bdbc3a47a55092e9c0f531 (patch)
tree518e7b076ec35ffe373414deb7a36724a278fff7
parent494933e4cdfa889d428a897c423a9f7218cb4764 (diff)
downloadgcc-fcce57564b63a66c86bdbc3a47a55092e9c0f531.zip
gcc-fcce57564b63a66c86bdbc3a47a55092e9c0f531.tar.gz
gcc-fcce57564b63a66c86bdbc3a47a55092e9c0f531.tar.bz2
* cpp.texi: Update for Fortran usage from Craig.
From-SVN: r22613
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cpp.texi50
2 files changed, 49 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 62c224b..6a94c26 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+Mon Sep 28 04:11:35 1998 Jeffrey A Law (law@cygnus.com)
+
+ * cpp.texi: Update for Fortran usage from Craig.
+
Fri Sep 25 22:09:47 1998 David Edelsohn <edelsohn@mhpcc.edu>
* rs6000.c (function_arg_boundary): Revert accidental change on
diff --git a/gcc/cpp.texi b/gcc/cpp.texi
index e71b6e9..c81554b 100644
--- a/gcc/cpp.texi
+++ b/gcc/cpp.texi
@@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions.
@titlepage
@c @finalout
@title The C Preprocessor
-@subtitle Last revised March 1997
+@subtitle Last revised September 1998
@subtitle for GCC version 2
@author Richard M. Stallman
@page
@@ -51,8 +51,8 @@ This booklet is eventually intended to form the first chapter of a GNU
C Language manual.
@vskip 0pt plus 1filll
-Copyright @copyright{} 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997 Free
-Software Foundation, Inc.
+Copyright @copyright{} 1987, 1989, 1991-1998
+Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -2594,6 +2594,46 @@ Traditionally, @samp{\} inside a macro argument suppresses the syntactic
significance of the following character.
@end itemize
+@cindex Fortran
+@cindex unterminated
+Use the @samp{-traditional} option when preprocessing Fortran code,
+so that singlequotes and doublequotes
+within Fortran comment lines
+(which are generally not recognized as such by the preprocessor)
+do not cause diagnostics
+about unterminated character or string constants.
+
+However, this option does not prevent diagnostics
+about unterminated comments
+when a C-style comment appears to start, but not end,
+within Fortran-style commentary.
+
+So, the following Fortran comment lines are accepted with
+@samp{-traditional}:
+
+@smallexample
+C This isn't an unterminated character constant
+C Neither is "20000000000, an octal constant
+C in some dialects of Fortran
+@end smallexample
+
+However, this type of comment line will likely produce a diagnostic,
+or at least unexpected output from the preprocessor,
+due to the unterminated comment:
+
+@smallexample
+C Some Fortran compilers accept /* as starting
+C an inline comment.
+@end smallexample
+
+@cindex g77
+Note that @code{g77} automatically supplies
+the @samp{-traditional} option
+when it invokes the preprocessor.
+However, a future version of @code{g77}
+might use a different, more-Fortran-aware preprocessor
+in place of @code{cpp}.
+
@item -trigraphs
@findex -trigraphs
Process ANSI standard trigraph sequences. These are three-character
@@ -2778,8 +2818,8 @@ Like @samp{-M} but the dependency information is written to @var{file}.
This is in addition to compiling the file as specified---@samp{-MD} does
not inhibit ordinary compilation the way @samp{-M} does.
-When invoking gcc, do not specify the @var{file} argument.
-Gcc will create file names made by replacing ".c" with ".d" at
+When invoking @code{gcc}, do not specify the @var{file} argument.
+@code{gcc} will create file names made by replacing ".c" with ".d" at
the end of the input file names.
In Mach, you can use the utility @code{md} to merge multiple dependency