public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] ada: Fix uses of not Present
@ 2024-01-09 13:15 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2024-01-09 13:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

From: Piotr Trojanek <trojanek@adacore.com>

Fix style violation reported by GNATcheck.

gcc/ada/

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

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_aggr.adb | 2 +-
 gcc/ada/sem_ch8.adb  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index f586c18e655..d3d4c4a140f 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 fc2fec5f224..451a1b67fba 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
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-09 13:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 13:15 [COMMITTED] ada: Fix uses of not Present 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).