public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-1749] ada: Tune style in detection of writable function actuals
@ 2023-06-13 7:32 Marc Poulhi?s
0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-06-13 7:32 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fbf4140df117d28428e03a3f3c986787609d32b6
commit r14-1749-gfbf4140df117d28428e03a3f3c986787609d32b6
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Mon Mar 20 20:27:09 2023 +0100
ada: Tune style in detection of writable function actuals
Cleanup; semantics is unaffected.
gcc/ada/
* sem_util.adb (Check_Function_Writable_Actuals): Tune style; use
subtype name to detect membership test nodes.
Diff:
---
gcc/ada/sem_util.adb | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index a75ebf5d7b1..237bbd3987c 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -2899,6 +2899,10 @@ package body Sem_Util is
function Get_Record_Part (N : Node_Id) return Node_Id;
-- Return the record part of this record type definition
+ ---------------------
+ -- Get_Record_Part --
+ ---------------------
+
function Get_Record_Part (N : Node_Id) return Node_Id is
Type_Def : constant Node_Id := Type_Definition (N);
begin
@@ -3293,9 +3297,7 @@ package body Sem_Util is
& "in unspecified order",
Node (Elmt_2));
- when N_In
- | N_Not_In
- =>
+ when N_Membership_Test =>
Error_Msg_N
("value may be affected by call in other "
& "alternative because they are evaluated "
@@ -3307,7 +3309,7 @@ package body Sem_Util is
("value of actual may be affected by call in "
& "other actual because they are evaluated "
& "in unspecified order",
- Node (Elmt_2));
+ Node (Elmt_2));
end case;
end if;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-13 7:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 7:32 [gcc r14-1749] ada: Tune style in detection of writable function actuals Marc Poulhi?s
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).