Fortran: fix documentation of -fno-underscoring [PR109216]
Checks
Commit Message
Dear all,
as reported, the implicit documentation of -funderscoring, which
is found under -fno-underscoring, has gone sideways long time ago.
The attached patch should fix it.
OK for mainline, or did I miss something?
Thanks,
Harald
Comments
On 3/20/23 14:05, Harald Anlauf via Gcc-patches wrote:
> Dear all,
>
> as reported, the implicit documentation of -funderscoring, which
> is found under -fno-underscoring, has gone sideways long time ago.
> The attached patch should fix it.
>
> OK for mainline, or did I miss something?
This is OK.
-Sandra
From c296196044248f974b4907bb2f5bdeeea24adb5b Mon Sep 17 00:00:00 2001
From: Harald Anlauf <anlauf@gmx.de>
Date: Mon, 20 Mar 2023 20:55:00 +0100
Subject: [PATCH] Fortran: fix documentation of -fno-underscoring [PR109216]
gcc/fortran/ChangeLog:
PR fortran/109216
* invoke.texi: Correct documentation of how underscores are appended
to external names.
---
gcc/fortran/invoke.texi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -1573,7 +1573,7 @@ Do not transform names of entities specified in the Fortran
source file by appending underscores to them.
With @option{-funderscoring} in effect, GNU Fortran appends one
-underscore to external names with no underscores. This is done to ensure
+underscore to external names. This is done to ensure
compatibility with code produced by many UNIX Fortran compilers.
@emph{Caution}: The default behavior of GNU Fortran is
@@ -1596,7 +1596,7 @@ I = J() + MAX_COUNT (MY_VAR, LVAR)
@noindent
is implemented as something akin to:
@smallexample
-i = j_() + max_count__(&my_var__, &lvar);
+i = j_() + max_count_(&my_var, &lvar);
@end smallexample
With @option{-fno-underscoring}, the same statement is implemented as:
--
2.35.3