* [COMMITTED] ada: Tune style in detection of writable function actuals
@ 2023-06-13 7:37 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-06-13 7:37 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
From: Piotr Trojanek <trojanek@adacore.com>
Cleanup; semantics is unaffected.
gcc/ada/
* sem_util.adb (Check_Function_Writable_Actuals): Tune style; use
subtype name to detect membership test nodes.
Tested on x86_64-pc-linux-gnu, committed on master.
---
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;
--
2.40.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-13 7:37 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:37 [COMMITTED] 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).