public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler
@ 2023-10-16 17:11 Tobias Burnus
  2023-10-16 18:31 ` Harald Anlauf
  2023-10-17 11:26 ` [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler Stanislav Maslovski
  0 siblings, 2 replies; 8+ messages in thread
From: Tobias Burnus @ 2023-10-16 17:11 UTC (permalink / raw)
  To: gcc-patches, fortran

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

Yesterday, someone was confused because the signal handler did not work.

It turned out that the created Fortran procedure used as handler used
pass by reference - and 'signal' passed the it by value.

This patch adds the 'passed by value' to the wording:

"@var{HANDLER} to be executed with a single integer argument passed by
value"

OK for mainline?

Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Attachment #2: signal-doc.diff --]
[-- Type: text/x-patch, Size: 1189 bytes --]

fortran/intrinsic.texi: Add 'passed by value' to signal handler

gcc/fortran/ChangeLog:

	* intrinsic.texi (signal): Mention that the argument
	passed to the signal handler procedure is passed by reference.

diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 6c7ad03a02c..3620209e00a 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -13168,10 +13168,10 @@ end program test_sign
 @table @asis
 @item @emph{Description}:
 @code{SIGNAL(NUMBER, HANDLER [, STATUS])} causes external subroutine
-@var{HANDLER} to be executed with a single integer argument when signal
-@var{NUMBER} occurs.  If @var{HANDLER} is an integer, it can be used to
-turn off handling of signal @var{NUMBER} or revert to its default
-action.  See @code{signal(2)}.
+@var{HANDLER} to be executed with a single integer argument passed by
+value when signal @var{NUMBER} occurs.  If @var{HANDLER} is an integer,
+it can be used to turn off handling of signal @var{NUMBER} or revert to
+its default action.  See @code{signal(2)}.
 
 If @code{SIGNAL} is called as a subroutine and the @var{STATUS} argument
 is supplied, it is set to the value returned by @code{signal(2)}.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-17 18:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 17:11 [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler Tobias Burnus
2023-10-16 18:31 ` Harald Anlauf
2023-10-16 18:37   ` Steve Kargl
2023-10-17  7:47   ` [patch] fortran/intrinsic.texi: Improve SIGNAL intrinsic entry (was: [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler) Tobias Burnus
2023-10-17 17:02     ` [patch] fortran/intrinsic.texi: Improve SIGNAL intrinsic entry Harald Anlauf
2023-10-17 17:36       ` Tobias Burnus
2023-10-17 18:05         ` Harald Anlauf
2023-10-17 11:26 ` [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler Stanislav Maslovski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).