]> 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)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:18 +0000 (09:44 +0200)
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 6f9fe738ddd93c731180d7a61ffb0cfbc694d3d5..593e6f8c16905da7fe205efc78e4fd9dee87d45a 100644 (file)
@@ -11224,8 +11224,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;