Hi Sandra,

thanks for taking on the laborious task. I have browsed over the changes and
found:

Patch 3 in intrinsic.texi:

@@ -2071,6 +2071,9 @@ end program atomic
 @cindex Atomic subroutine, ADD with fetch

 @table @asis
+@item @emph{Synopsis}:
+@code{CALL ATOMIC_FETCH_ADD (ATOM, VALUE, old [, STAT])}
+
`old` should be uppercase here, too, for consistency.

Yes, I know, that is nothing you changed. I just stumbled over it and while we
are at it, let's address it.

Same for:

@@ -3074,6 +3074,9 @@ end program test_btest
 @cindex pointer, C association status

 @table @asis
+@item @emph{Synopsis}:
+@code{RESULT = C_ASSOCIATED(c_ptr_1[, c_ptr_2])}

With uppercasing in the following paragraph needed, too. And I vote for using
CPTR1 and CPTR2 instead.

Same here:
@@ -3177,6 +3177,9 @@ end program main
 @cindex pointer, C address of pointers

 @table @asis
+@item @emph{Synopsis}:
+@code{CALL C_F_PROCPOINTER(cptr, fptr)}

and here:
@@ -3235,6 +3235,9 @@ end program main
 @cindex pointer, C address of procedures

 @table @asis
+@item @emph{Synopsis}:
+@code{RESULT = C_FUNLOC(x)}
+

I'd say: "Ok, I'll stop." here, but that is the list of changes needed to get
the description in intrinsic.texi neat.

In part 4 of your patch, can you rephrase:

@@ -1118,6 +1114,10 @@ program test_allocated
   if (.not. allocated(x)) allocate(x(i))
 end program test_allocated
 @end smallexample
+
+@item @emph{Standard}:
+Fortran 90 and later.  Note, the @code{SCALAR=} keyword and allocatable
+scalar entities are available in Fortran 2003 and later.
 @end table

to

+Fortran 90 and later; for @code{SCALAR=} keyword and allocatable
+scalar entities Fortran 2003 and later.

Just for consistency.

With these changes, ok for mainline.

Thank you very much for taking on that laborious task. My deepest respect!

Regards and thanks,
        Andre



On Tue, 25 Feb 2025 20:16:51 -0700
Sandra Loosemore <sloosem...@baylibre.com> wrote:

> This series addresses PR 47928, a Fortran documentation issue filed back
> in 2011.  Quoting from the issue:
>
> "IMHO the order of paragraphs in the intrinsics chapter of the manual
> is a bit illogical. For instance, the description comes before the
> (strangely named) syntax paragraph, so when the description refers to
> arguments it's a bit backwards. Similarly, is the version of the
> standard where the intrinsic was introduced really the second most
> important thing a user needs to know?"
>
> I'd also thought that the ordering of the syntax/description
> subheadings was confusing even before I found this issue, so I figured
> this was a worthwhile documentation fix for me to tackle.
>
> Only the first part involved manual editing; the other three patches
> were purely mechanical: search-and-replace for part 2, Emacs keyboard
> macros for parts 3 and 4 (it did take me a few attempts before I got
> the latter right).  I did confirm that part 2 consisted of nothing but
> whitespace changes and that parts 3 and 4 did not add or lose any
> lines, only change their ordering.  I skimmed both the patches and the
> final PDF output but I admit I didn't do a line-by-line review of the
> entire patch series.
>
> Both parts 3 and 4 are too big for the mailing list so I have attached
> the whole set as a tarball instead of posting the pieces individually.
> I'll hold off on pushing this patch series for a few days in case
> anybody else does want to review it.
>
> I can see that the documentation for the intrinsics and library
> functions still needs a lot of cleanup in addition to this patch.
> There are problems all over the place with inconsistent use of @var
> markup to describe arguments, some instances of missing @code
> markup on symbolic constants, poor formatting of the syntax/synopsis
> in the library function documentation with line breaks in random
> places, places where using a table for formatting would greatly
> improve readability (e.g. _gfortran_set_options), etc.  But those are
> separate from the issue addressed by this patch series and would need
> to be addressed individually by hand.
>
> -Sandra
>
> Sandra Loosemore (4):
>    Fortran: Tidy subheadings in Fortran documentation [PR47928]
>    Fortran: Whitespace cleanup in documentation [PR47928]
>    Fortran: Rename/move "Syntax" subheading in documentation [PR47928]
>    Fortran: Move "Standard" subheading in documentation [PR47928]
>
>   gcc/fortran/gfortran.texi  |  387 ++--
>   gcc/fortran/intrinsic.texi | 3912 ++++++++++++++++++------------------
>   2 files changed, 2147 insertions(+), 2152 deletions(-)
>


--
Andre Vehreschild * Email: vehre ad gmx dot de

Reply via email to