https://gcc.gnu.org/g:618db8d5ecd6d113d3089fda6fbf8bf472ddfc25

commit r13-8436-g618db8d5ecd6d113d3089fda6fbf8bf472ddfc25
Author: Marc Poulhiès <poulh...@adacore.com>
Date:   Wed Mar 8 20:39:45 2023 +0100

    ada: Fix error message for Aggregate aspect
    
    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.

Diff:
---
 gcc/ada/sem_ch13.adb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 073e8f9b0d8..550f10366f2 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -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;

Reply via email to