]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix uses of not Present
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 7 Dec 2023 20:22:21 +0000 (21:22 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 9 Jan 2024 13:13:30 +0000 (14:13 +0100)
Fix style violation reported by GNATcheck.

gcc/ada/

* sem_aggr.adb (Resolve_Container_Aggregate): Use "No".
* sem_ch8.adb (Find_Direct_Name): Likewise.

gcc/ada/sem_aggr.adb
gcc/ada/sem_ch8.adb

index f586c18e655b7e52a0269f0aff6e9ca2a1a6886f..d3d4c4a140f6bbaebecef6578e944c2f2e8f0c14 100644 (file)
@@ -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 "
index fc2fec5f2243b2875a8bc4faf36c4f1338e5df89..451a1b67fba3912e396f8057fc3c6ef75e28ff7c 100644 (file)
@@ -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