From: Marc Poulhiès Date: Tue, 15 Feb 2022 14:12:38 +0000 (+0100) Subject: [Ada] Fix the Ada 2022 iterated component association RM reference X-Git-Tag: basepoints/gcc-14~6819 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84f20139792e97f9fb6e10918e271c3277d0f178;p=thirdparty%2Fgcc.git [Ada] Fix the Ada 2022 iterated component association RM reference 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. --- diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 6e73aac4a10..0437a501e79 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -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));