Commit bac23dd6 by Craig Burley Committed by Craig Burley

rename -fsubscript-check to -fbounds-check

From-SVN: r27170
parent b7f2c1fc
Wed May 26 11:45:21 1999 Craig Burley <craig@jcb-sc.com>
Rename -fsubscript-check to -fbounds-check and
-ff2c-subscript-check to -ffortran-bounds-check:
* g77.texi: Rename options in docs, clarify usage.
* lang-options.h: Rename options, clarify doclets.
* news.texi: Rename options, don't bother with fortran-specific
option.
* top.c (ffe_decode_option): Rename recognized strings.
Tue May 25 18:21:09 1999 Craig Burley <craig@jcb-sc.com> Tue May 25 18:21:09 1999 Craig Burley <craig@jcb-sc.com>
* com.c (FFECOM_FASTER_ARRAY_REFS): Delete this vestige, * com.c (FFECOM_FASTER_ARRAY_REFS): Delete this vestige,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@c %**start of header @c %**start of header
@setfilename g77.info @setfilename g77.info
@set last-update 1999-05-13 @set last-update 1999-05-26
@set copyrights-g77 1995-1999 @set copyrights-g77 1995-1999
@include root.texi @include root.texi
...@@ -1471,7 +1471,7 @@ by type. Explanations are in the following sections. ...@@ -1471,7 +1471,7 @@ by type. Explanations are in the following sections.
-falias-check -fargument-alias -falias-check -fargument-alias
-fargument-noalias -fno-argument-noalias-global -fargument-noalias -fno-argument-noalias-global
-fno-globals -fflatten-arrays -fno-globals -fflatten-arrays
-fsubscript-check -ff2c-subscript-check -fbounds-check -ffortran-bounds-check
@end smallexample @end smallexample
@end table @end table
...@@ -3386,10 +3386,10 @@ It is intended for use only by @code{g77} developers, ...@@ -3386,10 +3386,10 @@ It is intended for use only by @code{g77} developers,
to evaluate code-generation issues. to evaluate code-generation issues.
It might be removed at any time. It might be removed at any time.
@cindex -fsubscript-check option @cindex -fbounds-check option
@cindex -ff2c-subscript-check option @cindex -ffortran-bounds-check option
@item -fsubscript-check @item -fbounds-check
@itemx -ff2c-subscript-check @itemx -ffortran-bounds-check
@cindex bounds checking @cindex bounds checking
@cindex range checking @cindex range checking
@cindex array bounds checking @cindex array bounds checking
...@@ -3414,12 +3414,12 @@ such as references to below the beginning of an assumed-size array. ...@@ -3414,12 +3414,12 @@ such as references to below the beginning of an assumed-size array.
@code{g77} also generates checks for @code{CHARACTER} substring references, @code{g77} also generates checks for @code{CHARACTER} substring references,
something @code{f2c} currently does not do. something @code{f2c} currently does not do.
Since a future version of @code{g77} might use a different implementation, Use the new @samp{-ffortran-bounds-check} option
use the new @samp{-ff2c-subscript-check} option to specify bounds-checking for only the Fortran code you are compiling,
if your application requires use of @code{s_rnge} or a compile-time diagnostic. not necessarily for code written in other languages.
@emph{Note:} To provide more detailed information on the offending subscript, @emph{Note:} To provide more detailed information on the offending subscript,
@code{g77} provides @code{s_rnge} @code{g77} provides the @code{libg2c} run-time library routine @code{s_rnge}
with somewhat differently-formatted information. with somewhat differently-formatted information.
Here's a sample diagnostic: Here's a sample diagnostic:
...@@ -11178,7 +11178,7 @@ themselves as @emph{visible} problems some time later. ...@@ -11178,7 +11178,7 @@ themselves as @emph{visible} problems some time later.
Overflowing the bounds of an array---usually by writing beyond Overflowing the bounds of an array---usually by writing beyond
the end of it---is one of two kinds of bug that often occurs the end of it---is one of two kinds of bug that often occurs
in Fortran code. in Fortran code.
(Compile your code with the @samp{-fsubscript-check} option (Compile your code with the @samp{-fbounds-check} option
to catch many of these kinds of errors at program run time.) to catch many of these kinds of errors at program run time.)
The other kind of bug is a mismatch between the actual arguments The other kind of bug is a mismatch between the actual arguments
......
...@@ -149,10 +149,10 @@ FTNOPT( "-fglobals", "" ) ...@@ -149,10 +149,10 @@ FTNOPT( "-fglobals", "" )
FTNOPT( "-fno-globals", "Disable fatal diagnostics about inter-procedural problems" ) FTNOPT( "-fno-globals", "Disable fatal diagnostics about inter-procedural problems" )
FTNOPT( "-ftypeless-boz", "Make prefix-radix non-decimal constants be typeless" ) FTNOPT( "-ftypeless-boz", "Make prefix-radix non-decimal constants be typeless" )
FTNOPT( "-fno-typeless-boz", "" ) FTNOPT( "-fno-typeless-boz", "" )
FTNOPT( "-fsubscript-check", "Generate code to check array-subscript ranges" ) FTNOPT( "-fbounds-check", "Generate code to check subscript and substring bounds" )
FTNOPT( "-fno-subscript-check", "" ) FTNOPT( "-fno-bounds-check", "" )
FTNOPT( "-ff2c-subscript-check", "Generate f2c-like code to check array-subscript ranges") FTNOPT( "-ffortran-bounds-check", "Fortran-specific form of -fbounds-check")
FTNOPT( "-fno-f2c-subscript-check", "" ) FTNOPT( "-fno-fortran-bounds-check", "" )
FTNOPT( "-Wglobals", "" ) FTNOPT( "-Wglobals", "" )
FTNOPT( "-Wno-globals", "Disable warnings about inter-procedural problems" ) FTNOPT( "-Wno-globals", "Disable warnings about inter-procedural problems" )
/*"-Wimplicit",*/ /*"-Wimplicit",*/
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
@c in the standalone derivations of this file (e.g. NEWS). @c in the standalone derivations of this file (e.g. NEWS).
@set copyrights-news 1995-1999 @set copyrights-news 1995-1999
@set last-update-news 1999-05-13 @set last-update-news 1999-05-26
@include root.texi @include root.texi
...@@ -217,16 +217,10 @@ The @samp{-ax} option is now obeyed when compiling Fortran programs. ...@@ -217,16 +217,10 @@ The @samp{-ax} option is now obeyed when compiling Fortran programs.
@end ifclear @end ifclear
@item @item
The new @samp{-fsubscript-check} option The new @samp{-fbounds-check} option
causes @code{g77} to compile run-time bounds checks causes @code{g77} to compile run-time bounds checks
of array subscripts, as well as of substring start and end points. of array subscripts, as well as of substring start and end points.
The current implementation uses the @code{libf2c}
library routine @code{s_rnge} to print the diagnostic.
Since a future version of @code{g77} might use a different implementation,
use the new @samp{-ff2c-subscript-check} option
if your application requires use of @code{s_rnge} or a compile-time diagnostic.
@item @item
Source file names with the suffixes @samp{.FOR} and @samp{.FPP} Source file names with the suffixes @samp{.FOR} and @samp{.FPP}
now are recognized by @code{g77} now are recognized by @code{g77}
......
...@@ -323,13 +323,13 @@ ffe_decode_option (argc, argv) ...@@ -323,13 +323,13 @@ ffe_decode_option (argc, argv)
ffe_set_is_globals (TRUE); ffe_set_is_globals (TRUE);
else if (strcmp (&opt[2], "no-globals") == 0) else if (strcmp (&opt[2], "no-globals") == 0)
ffe_set_is_globals (FALSE); ffe_set_is_globals (FALSE);
else if (strcmp (&opt[2], "subscript-check") == 0) else if (strcmp (&opt[2], "bounds-check") == 0)
ffe_set_is_subscript_check (TRUE); ffe_set_is_subscript_check (TRUE);
else if (strcmp (&opt[2], "no-subscript-check") == 0) else if (strcmp (&opt[2], "no-bounds-check") == 0)
ffe_set_is_subscript_check (FALSE); ffe_set_is_subscript_check (FALSE);
else if (strcmp (&opt[2], "f2c-subscript-check") == 0) else if (strcmp (&opt[2], "fortran-bounds-check") == 0)
ffe_set_is_subscript_check (TRUE); ffe_set_is_subscript_check (TRUE);
else if (strcmp (&opt[2], "no-f2c-subscript-check") == 0) else if (strcmp (&opt[2], "no-fortran-bounds-check") == 0)
ffe_set_is_subscript_check (FALSE); ffe_set_is_subscript_check (FALSE);
else if (strcmp (&opt[2], "typeless-boz") == 0) else if (strcmp (&opt[2], "typeless-boz") == 0)
ffe_set_is_typeless_boz (TRUE); ffe_set_is_typeless_boz (TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment