[COMMITTED] Fortran: Fix Texinfo warnings building the manual.

2024-12-31 Thread Sandra Loosemore
gcc/fortran/ChangeLog
* gfortran.texi (Function ABI Documentation): Make menu ordering
consistent with subsection ordering.
---
 gcc/fortran/gfortran.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index eb17aff7e38..4509f080ba4 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -4197,9 +4197,9 @@ future implementation of teams.  It is about to change 
without further notice.
 * _gfortran_caf_send:: Sending data from a local image to a remote image
 * _gfortran_caf_get:: Getting data from a remote image
 * _gfortran_caf_sendget:: Sending data between remote images
-* _gfortran_caf_get_by_ct:: Getting data from a remote image using a remote 
side accessor
 * _gfortran_caf_send_by_ref:: Sending data from a local image to a remote 
image using enhanced references
 * _gfortran_caf_get_by_ref:: Getting data from a remote image using enhanced 
references
+* _gfortran_caf_get_by_ct:: Getting data from a remote image using a remote 
side accessor
 * _gfortran_caf_sendget_by_ref:: Sending data between remote images using 
enhanced references
 * _gfortran_caf_lock:: Locking a lock variable
 * _gfortran_caf_unlock:: Unlocking a lock variable
-- 
2.34.1



Fortran documentation patches

2024-12-31 Thread Sandra Loosemore
Tobias pointed out that I forgot to CC the fortran mailing list about 
these patches to the gfortran manual that I pushed just before the 
holidays, while wearing my documentation maintainer hat:


https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672151.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672152.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672153.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672155.html
https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672154.html

I have a few more of these content-free cleanup patches pending that I 
will remember to send here when I have a chance to push them.


Also, I was wondering if I could get some more feedback on PR47928 
before I spend time doing anything about that.  It's a proposal to 
reorder the subheadings for each entry in the intrinsics chapter into 
something that's easier to follow, like renaming "Syntax" to "Synopsis" 
and moving it before the "Description", and pushing "Standard" down to 
the end of the entry.


-Sandra


Re: Fortran documentation patches

2024-12-31 Thread Jerry Delisle
I think the idea is OK. I am not so adept with editors so if you can make
it doable, reordering information is fine with me

On Tue, Dec 31, 2024, 5:12 PM Sandra Loosemore 
wrote:

> Tobias pointed out that I forgot to CC the fortran mailing list about
> these patches to the gfortran manual that I pushed just before the
> holidays, while wearing my documentation maintainer hat:
>
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672151.html
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672152.html
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672153.html
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672155.html
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672154.html
>
> I have a few more of these content-free cleanup patches pending that I
> will remember to send here when I have a chance to push them.
>
> Also, I was wondering if I could get some more feedback on PR47928
> before I spend time doing anything about that.  It's a proposal to
> reorder the subheadings for each entry in the intrinsics chapter into
> something that's easier to follow, like renaming "Syntax" to "Synopsis"
> and moving it before the "Description", and pushing "Standard" down to
> the end of the entry.
>
> -Sandra
>


[COMMITTED] Fortran: Fix that/which usage in the manual.

2024-12-31 Thread Sandra Loosemore
In English usage, "that" introduces a restrictive clause while "which"
introduces a non-restrictive or descriptive clause.  "That" is almost
never preceded by a comma while "which" often is.  The Fortran manual
had many instances where these uses were reversed, or where a comma
was used with "that"; this patch fixes them.  In some cases I have
substituted less convoluted wording instead.

gcc/fortran/ChangeLog
* gfortran.texi: Clean up that/which usage throughout the file.
* intrinsic.texi: Likewise.
* invoke.texi: Likewise.
---
 gcc/fortran/gfortran.texi  | 66 +++---
 gcc/fortran/intrinsic.texi | 32 +-
 gcc/fortran/invoke.texi| 38 +++---
 3 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 47b89ea726c..eb17aff7e38 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -705,7 +705,7 @@ the modes are the same as for the @code{CONVERT} specifier:
 for unformatted files.
 @item @code{BIG_ENDIAN} Use the big-endian format for unformatted files.
 @end itemize
-For POWER systems which support @option{-mabi=ieeelongdouble},
+For POWER systems that support @option{-mabi=ieeelongdouble},
 there are additional options, which can be combined with the
 others with commas. Those are
 @itemize @w{}
@@ -800,7 +800,7 @@ The default value is 131072.
 @chapter Compiler Characteristics
 
 This chapter describes certain characteristics of the GNU Fortran
-compiler, that are not specified by the Fortran standard, but which
+compiler that are not specified by the Fortran standard, but which
 might in some way or another become visible to the programmer.
 
 @menu
@@ -1140,7 +1140,7 @@ end program main
 
 Asynchronous I/O is supported if the program is linked against the
 POSIX thread library. If that is not the case, all I/O is performed
-as synchronous. On systems which do not support pthread condition
+as synchronous. On systems that do not support pthread condition
 variables, such as AIX, I/O is also performed as synchronous.
 
 On some systems, such as Darwin or Solaris, the POSIX thread library
@@ -1305,7 +1305,7 @@ are:
   DATA i/1/, j/2/, x/3*0.,1./
 @end smallexample
 
-Note that variables which are explicitly initialized in declarations
+Note that variables that are explicitly initialized in declarations
 or in @code{DATA} statements automatically acquire the @code{SAVE}
 attribute.
 
@@ -1776,7 +1776,7 @@ for unformatted files.
 @item @code{CONVERT='BIG_ENDIAN'} Use the big-endian representation for
 unformatted files.
 @end itemize
-On POWER systems which support @option{-mabi=ieeelongdouble},
+On POWER systems that support @option{-mabi=ieeelongdouble},
 there are additional options, which can be combined with the others
 with commas. Those are
 @itemize @w{}
@@ -2049,7 +2049,7 @@ rules and exceptions:
 Otherwise they may contain no specifiers.
 
 @item Structures may contain a special field with the name @code{%FILL}.
-This creates an anonymous component which cannot be accessed but occupies
+This creates an anonymous component that cannot be accessed but occupies
 space just as if a component of the same type was declared in its place, useful
 for alignment purposes.  As an example, the following structure consists
 of at least sixteen bytes:
@@ -2622,7 +2622,7 @@ c ... Code that sets A, B and C
 @subsection Variable @code{FORMAT} expressions
 @cindex @code{FORMAT}
 
-A variable @code{FORMAT} expression is format statement which includes
+A variable @code{FORMAT} expression is format statement that includes
 angle brackets enclosing a Fortran expression: @code{FORMAT(I)}.  GNU
 Fortran does not support this legacy extension.  The effect of variable
 format expressions can be reproduced by using the more powerful (and
@@ -2719,7 +2719,7 @@ reading from the position marked previously.
 @section Experimental features future Fortran versions
 @cindex Future Fortran versions
 
-GNU Fortran supports some experimental features which have been
+GNU Fortran supports some experimental features that have been
 proposed and accepted by the J3 standards committee.  These
 exist to give users a chance to try them out, and to provide
 a reference implementation.
@@ -2784,7 +2784,7 @@ as index variables in @code{DO} loops and as array 
indices.
 Unsigned numbers can be read and written using list-directed,
 formatted and unformatted I/O.  For formatted I/O, the @samp{B},
 @samp{I}, @samp{O} and @samp{Z} descriptors are valid.  Negative
-values and values which would overflow are rejected with
+values and values that would overflow are rejected with
 @code{-pedantic}.
 
 @code{SELECT CASE} is supported for unsigned integers.
@@ -3203,7 +3203,7 @@ foobar ()
 @}
 @end smallexample
 
-A matching implementation for @code{get_values} in Fortran, that correctly
+A matching implementation for @code{get_values} in Fortran that correctly
 receives the

[COMMITTED] Fortran: Grammar/markup fixes in intrinsics documentation

2024-12-31 Thread Sandra Loosemore
Continuing a series of patches to tidy the Fortran manual, this
installment fixes problems with inappropriate use of future tense and
adds some missing markup I noticed in passing.

gcc/fortran/ChangeLog
* intrinsic.texi: Grammar and markup fixes throughout
the file.
---
 gcc/fortran/intrinsic.texi | 100 ++---
 1 file changed, 50 insertions(+), 50 deletions(-)

diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index d11d37761d9..b47180126ca 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -348,10 +348,10 @@ another kind, which have more precision.  On typical 
target architectures
 supported by @command{gfortran}, this kind type parameter is @code{KIND=8}.
 Hence, @code{REAL(KIND=8)} and @code{DOUBLE PRECISION} are equivalent.
 In the description of generic intrinsic procedures, the kind type parameter
-will be specified by @code{KIND=*}, and in the description of specific
-names for an intrinsic procedure the kind type parameter will be explicitly
+is specified by @code{KIND=*}, and in the description of specific
+names for an intrinsic procedure the kind type parameter is explicitly
 given (e.g., @code{REAL(KIND=4)} or @code{REAL(KIND=8)}).  Finally, for
-brevity the optional @code{KIND=} syntax will be omitted.
+brevity the optional @code{KIND=} syntax is omitted.
 
 Many of the intrinsic procedures take one or more optional arguments.
 This document follows the convention used in the Fortran 95 standard,
@@ -380,8 +380,8 @@ the applicable standard for each intrinsic procedure is 
noted.
 @table @asis
 @item @emph{Description}:
 @code{ABORT} causes immediate termination of the program.  On operating
-systems that support a core dump, @code{ABORT} will produce a core dump.
-It will also print a backtrace, unless @code{-fno-backtrace} is given.
+systems that support a core dump, @code{ABORT} produces a core dump.
+It also prints a backtrace, unless @code{-fno-backtrace} is given.
 
 @item @emph{Standard}:
 GNU extension
@@ -759,7 +759,7 @@ Inverse function: @*
 
 @table @asis
 @item @emph{Description}:
-@code{ADJUSTL(STRING)} will left adjust a string by removing leading spaces.
+@code{ADJUSTL(STRING)} left adjusts a string by removing leading spaces.
 Spaces are inserted at the end of the string as needed.
 
 @item @emph{Standard}:
@@ -805,7 +805,7 @@ end program test_adjustl
 
 @table @asis
 @item @emph{Description}:
-@code{ADJUSTR(STRING)} will right adjust a string by removing trailing spaces.
+@code{ADJUSTR(STRING)} right adjusts a string by removing trailing spaces.
 Spaces are inserted at the start of the string as needed.
 
 @item @emph{Standard}:
@@ -929,7 +929,7 @@ expression indicating the kind parameter of the result.
 @item @emph{Return value}:
 The return value is of type @code{REAL} with the kind type parameter of the
 argument if the optional @var{KIND} is absent; otherwise, the kind
-type parameter will be given by @var{KIND}.  If the magnitude of 
+type parameter is given by @var{KIND}.  If the magnitude of
 @var{X} is less than one, @code{AINT(X)} returns zero.  If the
 magnitude is equal to or greater than one then it returns the largest
 whole number that does not exceed its magnitude.  The sign is the same
@@ -967,7 +967,7 @@ end program test_aint
 @code{ALARM(SECONDS, HANDLER [, STATUS])} causes external subroutine 
@var{HANDLER}
 to be executed after a delay of @var{SECONDS} by using @code{alarm(2)} to
 set up a signal and @code{signal(2)} to catch it. If @var{STATUS} is
-supplied, it will be returned with the number of seconds remaining until
+supplied, it is returned with the number of seconds remaining until
 any previously scheduled alarm was due to be delivered, or zero if there
 was no previously scheduled alarm.
 
@@ -1002,7 +1002,7 @@ program test_alarm
   call sleep(10)
 end program test_alarm
 @end smallexample
-This will cause the external routine @var{handler_print} to be called
+This causes the external routine @var{handler_print} to be called
 after 3 seconds.
 @end table
 
@@ -1211,7 +1211,7 @@ expression indicating the kind parameter of the result.
 @item @emph{Return value}:
 The return value is of type real with the kind type parameter of the
 argument if the optional @var{KIND} is absent; otherwise, the kind
-type parameter will be given by @var{KIND}.  If @var{A} is greater than
+type parameter is given by @var{KIND}.  If @var{A} is greater than
 zero, @code{ANINT(A)} returns @code{AINT(X+0.5)}.  If @var{A} is
 less than or equal to zero then it returns @code{AINT(X-0.5)}.
 
@@ -1577,7 +1577,7 @@ if @var{Y} is present, @var{X} shall be REAL.
 @item @emph{Return value}:
 The return value is of the same type and kind as @var{X}.
 If @var{Y} is present, the result is identical to @code{ATAN2(Y,X)}.
-Otherwise, it the arcus tangent of @var{X}, where the real part of
+Otherwise, it the arctangent of @var{X}, where the real part of
 the result is in radians and lies in the ra