]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix the Ada 2022 iterated component association RM reference
authorMarc Poulhiès <poulhies@adacore.com>
Tue, 15 Feb 2022 14:12:38 +0000 (15:12 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 13 May 2022 08:04:28 +0000 (08:04 +0000)
Fix the error message pointing to the Ada reference section on mixed
iterated component association being forbidden.  Remove useless loop.

gcc/ada/

* sem_aggr.adb (Resolve_Array_Aggregate): Fix ARM reference.
Remove useless loop.

gcc/ada/sem_aggr.adb

index 6e73aac4a108b35d09b046ce9ebc723458fa4642..0437a501e794c6cd4908950a788d32dcac14be28 100644 (file)
@@ -1833,7 +1833,7 @@ package body Sem_Aggr is
                  or else No (Iterator_Specification (Assoc))
                then
                   Error_Msg_N ("mixed iterated component association"
-                   & " (RM 4.4.3 (17.1/5))",
+                   & " (RM 4.3.3 (17.1/5))",
                       Assoc);
                   return False;
                end if;
@@ -1852,7 +1852,7 @@ package body Sem_Aggr is
                  and then Present (Iterator_Specification (Assoc))
                then
                   Error_Msg_N ("mixed iterated component association"
-                    & " (RM 4.4.3 (17.1/5))",
+                    & " (RM 4.3.3 (17.1/5))",
                       Assoc);
                   return False;
                end if;
@@ -1860,9 +1860,6 @@ package body Sem_Aggr is
                Next (Assoc);
             end loop;
 
-            while Present (Assoc) loop
-               Next (Assoc);
-            end loop;
          end if;
 
          Assoc := First (Component_Associations (N));