From: Piotr Trojanek Date: Thu, 7 Dec 2023 20:22:21 +0000 (+0100) Subject: ada: Fix uses of not Present X-Git-Tag: basepoints/gcc-15~3092 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ebae03696b71705630824c8aa5ccbaf7a240038;p=thirdparty%2Fgcc.git ada: Fix uses of not Present Fix style violation reported by GNATcheck. gcc/ada/ * sem_aggr.adb (Resolve_Container_Aggregate): Use "No". * sem_ch8.adb (Find_Direct_Name): Likewise. --- diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index f586c18e655b..d3d4c4a140f6 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -3445,7 +3445,7 @@ package body Sem_Aggr is -- associations (Add_Unnnamed is not allowed), so we issue an -- error if there are positional associations. - if not Present (Comp_Assocs) + if No (Comp_Assocs) and then Present (Expressions (N)) then Error_Msg_N ("container aggregate must be " diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index fc2fec5f2243..451a1b67fba3 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -6745,7 +6745,7 @@ package body Sem_Ch8 is Id : Entity_Id := Gen_Trailer; begin loop - if not Present (Id) then + if No (Id) then -- E_Trailer presumably occurred -- earlier on the entity list than -- Gen_Trailer. So E preceded the