]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix error message for Aggregate aspect
authorMarc Poulhiès <poulhies@adacore.com>
Wed, 8 Mar 2023 19:39:45 +0000 (20:39 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 13 Mar 2024 15:34:54 +0000 (16:34 +0100)
The error message was wrongly using % instead of & in the format string,
causing the displayed message to refer to incorrect names in some cases.

gcc/ada/

* sem_ch13.adb (Check_Aspect_At_Freeze_Point): fix format string,
use existing local Ident.

gcc/ada/sem_ch13.adb

index 073e8f9b0d8a0c6f784764a75f14e3bbcdfa7999..550f10366f2e87d898839f786d2134c805bcb1ed 100644 (file)
@@ -11147,8 +11147,8 @@ package body Sem_Ch13 is
          when Aspect_Aggregate =>
             if Is_Array_Type (Entity (ASN)) then
                Error_Msg_N
-                 ("aspect% can only be applied to non-array type",
-                  Identifier (ASN));
+                 ("aspect& can only be applied to non-array type",
+                  Ident);
             end if;
             Resolve_Aspect_Aggregate (Entity (ASN), Expression (ASN));
             return;