From: Piotr Trojanek Date: Mon, 20 Mar 2023 19:27:09 +0000 (+0100) Subject: ada: Tune style in detection of writable function actuals X-Git-Tag: basepoints/gcc-15~8390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbf4140df117d28428e03a3f3c986787609d32b6;p=thirdparty%2Fgcc.git 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 --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index a75ebf5d7b16..237bbd3987cb 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;