]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Spurious reference warning on qualified expression
authorJustin Squirek <squirek@adacore.com>
Thu, 21 Dec 2023 18:38:38 +0000 (18:38 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 6 May 2024 09:11:29 +0000 (11:11 +0200)
Incremental improvement/clean up.

gcc/ada/

* sem_warn.adb (Within_Postcondition): Add/modify comments to
document various cases.

gcc/ada/sem_warn.adb

index 8317b4490219e3ef57a10b29faada1cdc79fd886..54d8920a9438da2363bf74ad2b1ed7ca44debc64 100644 (file)
@@ -1973,6 +1973,8 @@ package body Sem_Warn is
                      begin
                         Nod := Parent (N);
                         while Present (Nod) loop
+                           --  General contract / predicate related pragma
+
                            if Nkind (Nod) = N_Pragma
                              and then
                                Pragma_Name_Unmapped (Nod)
@@ -1992,6 +1994,8 @@ package body Sem_Warn is
                            then
                               return True;
 
+                           --  Deal with special 'Ensures' Test_Case component
+
                            elsif Present (Parent (Nod)) then
                               P := Parent (Nod);