Commit aad9c4f4 by Arjen Markus Committed by Daniel Kraft

re PR fortran/37605 (Remarks on user manual for Gfortran)

2008-12-21  Arjen Markus  <arjen.markus@wldelft.nl>
	    Daniel Kraft  <d@domob.eu>

	PR fortran/37605
	* gfortran.texi: Fixed some typos and some minor style improvements.
	* intrinsic.texi: Some clarifications and typo-fixes.
	* invoke.texi: Better documenation of the behaviour of the
	-fdefault-*-8 options and some other fixes.

Co-Authored-By: Daniel Kraft <d@domob.eu>

From-SVN: r142866
parent b72bcb52
2008-12-21 Arjen Markus <arjen.markus@wldelft.nl>
Daniel Kraft <d@domob.eu>
PR fortran/37605
* gfortran.texi: Fixed some typos and some minor style improvements.
* intrinsic.texi: Some clarifications and typo-fixes.
* invoke.texi: Better documenation of the behaviour of the
-fdefault-*-8 options and some other fixes.
2008-12-18 Daniel Kraft <d@domob.eu> 2008-12-18 Daniel Kraft <d@domob.eu>
PR fortran/31822 PR fortran/31822
......
...@@ -263,14 +263,13 @@ code designed to be efficiently translated and processed ...@@ -263,14 +263,13 @@ code designed to be efficiently translated and processed
by a machine such as your computer. by a machine such as your computer.
Humans usually aren't as good writing machine code Humans usually aren't as good writing machine code
as they are at writing Fortran (or C++, Ada, or Java), as they are at writing Fortran (or C++, Ada, or Java),
because is easy to make tiny mistakes writing machine code. because it is easy to make tiny mistakes writing machine code.
@item @item
Provide the user with information about the reasons why Provide the user with information about the reasons why
the compiler is unable to create a binary from the source code. the compiler is unable to create a binary from the source code.
Usually this will be the case if the source code is flawed. Usually this will be the case if the source code is flawed.
When writing Fortran, it is easy to make big mistakes. The Fortran 90 standard requires that the compiler can point out
The Fortran 90 requires that the compiler can point out
mistakes to the user. mistakes to the user.
An incorrect usage of the language causes an @dfn{error message}. An incorrect usage of the language causes an @dfn{error message}.
...@@ -986,8 +985,14 @@ equivalent to the standard-conforming declaration ...@@ -986,8 +985,14 @@ equivalent to the standard-conforming declaration
TYPESPEC(k) x,y,z TYPESPEC(k) x,y,z
@end smallexample @end smallexample
@noindent @noindent
where @code{k} is equal to @code{size} for most types, but is equal to where @code{k} is the kind parameter suitable for the intended precision. As
@code{size/2} for the @code{COMPLEX} type. kind parameters are implementation-dependent, use the @code{KIND},
@code{SELECTED_INT_KIND} and @code{SELECTED_REAL_KIND} intrinsics to retrieve
the correct value, for instance @code{REAL*8 x} can be replaced by:
@smallexample
INTEGER, PARAMETER :: dbl = KIND(1.0d0)
REAL(KIND=dbl) :: x
@end smallexample
@node Old-style variable initialization @node Old-style variable initialization
@subsection Old-style variable initialization @subsection Old-style variable initialization
...@@ -1561,9 +1566,9 @@ worth a look. ...@@ -1561,9 +1566,9 @@ worth a look.
The long history of the Fortran language, its wide use and broad The long history of the Fortran language, its wide use and broad
userbase, the large number of different compiler vendors and the lack of userbase, the large number of different compiler vendors and the lack of
some features crucial to users in the first standards have lead to the some features crucial to users in the first standards have lead to the
existence of an important number of extensions to the language. While existence of a number of important extensions to the language. While
some of the most useful or popular extensions are supported by the GNU some of the most useful or popular extensions are supported by the GNU
Fortran compiler, not all existing extensions are supported. This section Fortran compiler, not all existing extensions are supported. This section
aims at listing these extensions and offering advice on how best make aims at listing these extensions and offering advice on how best make
code that uses them running with the GNU Fortran compiler. code that uses them running with the GNU Fortran compiler.
...@@ -1617,7 +1622,7 @@ store_catalog(7).id = 7831 ...@@ -1617,7 +1622,7 @@ store_catalog(7).id = 7831
store_catalog(7).description = "milk bottle" store_catalog(7).description = "milk bottle"
store_catalog(7).price = 1.2 store_catalog(7).price = 1.2
! We can also manipulates the whole structure ! We can also manipulate the whole structure
store_catalog(12) = pear store_catalog(12) = pear
print *, store_catalog(12) print *, store_catalog(12)
@end example @end example
......
...@@ -210,12 +210,12 @@ form is determined by the file extension. ...@@ -210,12 +210,12 @@ form is determined by the file extension.
@item -fall-intrinsics @item -fall-intrinsics
@opindex @code{fall-intrinsics} @opindex @code{fall-intrinsics}
Accept all of the intrinsic procedures provided in libgfortran This option causes all intrinsic procedures (including the GNU-specific
without regard to the setting of @option{-std}. In particular, extensions) to be accepted. This can be useful with @option{-std=f95} to
this option can be quite useful with @option{-std=f95}. Additionally, force standard-compliance but get access to the full range of intrinsics
@command{gfortran} will ignore @option{-Wintrinsics-std} and will never try available with @command{gfortran}. As a consequence, @option{-Wintrinsics-std}
to link to an @code{EXTERNAL} version if the intrinsic is not included in the will be ignored and no user-defined procedure with the same name as any
selected standard. intrinsic will be called except when it is explicitly declared @code{EXTERNAL}.
@item -fd-lines-as-code @item -fd-lines-as-code
@item -fd-lines-as-comments @item -fd-lines-as-comments
...@@ -229,17 +229,26 @@ comment lines. ...@@ -229,17 +229,26 @@ comment lines.
@item -fdefault-double-8 @item -fdefault-double-8
@opindex @code{fdefault-double-8} @opindex @code{fdefault-double-8}
Set the @code{DOUBLE PRECISION} type to an 8 byte wide type. Set the @code{DOUBLE PRECISION} type to an 8 byte wide type. If
@option{-fdefault-real-8} is given, @code{DOUBLE PRECISION} would
instead be promoted to 16 bytes if possible, and @option{-fdefault-double-8}
can be used to prevent this. The kind of real constants like @code{1.d0} will
not be changed by @option{-fdefault-real-8} though, so also
@option{-fdefault-double-8} does not affect it.
@item -fdefault-integer-8 @item -fdefault-integer-8
@opindex @code{fdefault-integer-8} @opindex @code{fdefault-integer-8}
Set the default integer and logical types to an 8 byte wide type. Set the default integer and logical types to an 8 byte wide type.
Do nothing if this is already the default. Do nothing if this is already the default. This option also affects
the kind of integer constants like @code{42}.
@item -fdefault-real-8 @item -fdefault-real-8
@opindex @code{fdefault-real-8} @opindex @code{fdefault-real-8}
Set the default real type to an 8 byte wide type. Set the default real type to an 8 byte wide type.
Do nothing if this is already the default. Do nothing if this is already the default. This option also affects
the kind of non-double real constants like @code{1.0}, and does promote
the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
@code{-fdefault-double-8} is given, too.
@item -fdollar-ok @item -fdollar-ok
@opindex @code{fdollar-ok} @opindex @code{fdollar-ok}
...@@ -861,7 +870,7 @@ zero), @samp{overflow} (overflow in a floating point operation), ...@@ -861,7 +870,7 @@ zero), @samp{overflow} (overflow in a floating point operation),
(operation produced a denormal value). (operation produced a denormal value).
Some of the routines in the Fortran runtime library, like Some of the routines in the Fortran runtime library, like
@samp{CPU_TIME}, are likely to to trigger floating point exceptions when @samp{CPU_TIME}, are likely to trigger floating point exceptions when
@code{ffpe-trap=precision} is used. For this reason, the use of @code{ffpe-trap=precision} is used. For this reason, the use of
@code{ffpe-trap=precision} is not recommended. @code{ffpe-trap=precision} is not recommended.
...@@ -1183,13 +1192,15 @@ by use of the @option{-ff2c} option. ...@@ -1183,13 +1192,15 @@ by use of the @option{-ff2c} option.
Enable generation of run-time checks for array subscripts Enable generation of run-time checks for array subscripts
and against the declared minimum and maximum values. It also and against the declared minimum and maximum values. It also
checks array indices for assumed and deferred checks array indices for assumed and deferred
shape arrays against the actual allocated bounds. shape arrays against the actual allocated bounds and ensures that all string
lengths are equal for character array constructors without an explicit
typespec.
Some checks require that @option{-fbounds-check} is set for Some checks require that @option{-fbounds-check} is set for
the compilation of the main program. the compilation of the main program.
In the future this may also include other forms of checking, e.g., checking Note: In the future this may also include other forms of checking, e.g.,
substring references. checking substring references.
@item fcheck-array-temporaries @item fcheck-array-temporaries
......
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