aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-03-20 20:27:09 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-06-13 09:31:42 +0200
commitfbf4140df117d28428e03a3f3c986787609d32b6 (patch)
tree9cbe5cdfde9c58133f5ecdce89d01feb0e372182 /gcc
parent0c7c1cb41de9a3c73a6fe3e737f852670e297e2a (diff)
downloadgcc-fbf4140df117d28428e03a3f3c986787609d32b6.zip
gcc-fbf4140df117d28428e03a3f3c986787609d32b6.tar.gz
gcc-fbf4140df117d28428e03a3f3c986787609d32b6.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_util.adb10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index a75ebf5..237bbd3 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;