Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c89524a8
Commit
c89524a8
authored
Feb 18, 1999
by
Craig Burley
Committed by
Craig Burley
Feb 17, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify -fno-globals docs
From-SVN: r25277
parent
3fab021b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
27 deletions
+61
-27
gcc/f/ChangeLog
+4
-0
gcc/f/g77.texi
+57
-27
No files found.
gcc/f/ChangeLog
View file @
c89524a8
1999-02-18 Craig Burley <craig@jcb-sc.com>
1999-02-18 Craig Burley <craig@jcb-sc.com>
* g77.texi: Clarify -fno-globals vs. -Wno-globals.
1999-02-18 Craig Burley <craig@jcb-sc.com>
* intdoc.in (LOG10): Fix typo.
* intdoc.in (LOG10): Fix typo.
1999-02-17 Ulrich Drepper <drepper@cygnus.com>
1999-02-17 Ulrich Drepper <drepper@cygnus.com>
...
...
gcc/f/g77.texi
View file @
c89524a8
...
@@ -3282,6 +3282,8 @@ arguments.
...
@@ -3282,6 +3282,8 @@ arguments.
@item -fno-globals
@item -fno-globals
@cindex global names, warning
@cindex global names, warning
@cindex warnings, global names
@cindex warnings, global names
@cindex in-line code
@cindex compilation, in-line
Disable diagnostics about inter-procedural
Disable diagnostics about inter-procedural
analysis problems, such as disagreements about the
analysis problems, such as disagreements about the
type of a function or a procedure's argument,
type of a function or a procedure's argument,
...
@@ -3298,9 +3300,8 @@ code that would otherwise be diagnosed.
...
@@ -3298,9 +3300,8 @@ code that would otherwise be diagnosed.
As such, this option might be quite useful when
As such, this option might be quite useful when
compiling existing, ``working'' code that happens
compiling existing, ``working'' code that happens
to have a few bugs that do not generally show
to have a few bugs that do not generally show themselves,
themselves, but @code{g77} exposes via a
but which @code{g77} diagnoses.
diagnostic.
Use of this option therefore has the effect of
Use of this option therefore has the effect of
instructing @code{g77} to behave more like it did
instructing @code{g77} to behave more like it did
...
@@ -3314,7 +3315,11 @@ Without this option, @code{g77} defaults to performing
...
@@ -3314,7 +3315,11 @@ Without this option, @code{g77} defaults to performing
the potentially inlining procedures as it started doing
the potentially inlining procedures as it started doing
in version 0.5.20, but as of version 0.5.21, it also
in version 0.5.20, but as of version 0.5.21, it also
diagnoses disagreements that might cause such inlining
diagnoses disagreements that might cause such inlining
to crash the compiler.
to crash the compiler as (fatal) errors,
and warns about similar disagreements
that are currently believed to not
likely to result in the compiler later crashing
or producing incorrect code.
@end table
@end table
@xref{Code Gen Options,,Options for Code Generation Conventions,
@xref{Code Gen Options,,Options for Code Generation Conventions,
...
@@ -15208,29 +15213,54 @@ Argument #@var{n} of @var{name} is @dots{}
...
@@ -15208,29 +15213,54 @@ Argument #@var{n} of @var{name} is @dots{}
@end smallexample
@end smallexample
These messages all identify disagreements about the
These messages all identify disagreements about the
global procedure named @var{name} among different program
global procedure named @var{name} among different program units
units (usually including @var{name} itself).
(usually including @var{name} itself).
These disagreements, if not diagnosed, could result in a
Whether a particular disagreement is reported
compiler crash if the compiler attempted to inline a reference
as a warning or an error
to @var{name} within a calling program unit that disagreed
can depend on the relative order
with the @var{name} program unit regarding whether the
of the disagreeing portions of the source file.
procedure is a subroutine or function, the type of the
return value of the procedure (if it is a function), the
Disagreements between a procedure invocation
number of arguments the procedure accepts, or the type
and the @emph{subsequent} procedure itself
of each argument.
are, usually, diagnosed as errors
when the procedure itself @emph{precedes} the invocation.
Such disagreements @emph{should} be fixed in the Fortran
Other disagreements are diagnosed via warnings.
code itself.
However, if that is not immediately practical, and the code
@cindex forward references
has been working for some time, it is possible it will work
@cindex in-line code
when compiled by @code{g77} with the @samp{-fno-globals} option.
@cindex compilation, in-line
This distinction, between warnings and errors,
The @samp{-fno-globals} option disables these diagnostics, and
is due primarily to the present tendency of the @code{gcc} back end
also disables all inlining of references to global procedures
to inline only those procedure invocations that are
to avoid compiler crashes.
@emph{preceded} by the corresponding procedure definitions.
The diagnostics are actually produced, but as warnings, unless
If the @code{gcc} back end is changed
the @samp{-Wno-globals} option also is specified.
to inline ``forward references'',
in which invocations precede definitions,
the @code{g77} front end will be changed
to treat both orderings as errors, accordingly.
The sorts of disagreements that are diagnosed by @code{g77} include
whether a procedure is a subroutine or function;
if it is a function, the type of the return value of the procedure;
the number of arguments the procedure accepts;
and the type of each argument.
Disagreements regarding global names among program units
in a Fortran program @emph{should} be fixed in the code itself.
However, if that is not immediately practical,
and the code has been working for some time,
it is possible it will work
when compiled with the @samp{-fno-globals} option.
The @samp{-fno-globals} option
causes these diagnostics to all be warnings
and disables all inlining of references to global procedures
(to avoid subsequent compiler crashes and bad-code generation).
Use of the @samp{-Wno-globals} option as well as @samp{-fno-globals}
suppresses all of these diagnostics.
(@samp{-Wno-globals} by itself disables only the warnings,
not the errors.)
After using @samp{-fno-globals} to work around these problems,
After using @samp{-fno-globals} to work around these problems,
it is wise to stop using that option and address them by fixing
it is wise to stop using that option and address them by fixing
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment