From: Marc Poulhiès Date: Wed, 8 Mar 2023 19:39:45 +0000 (+0100) Subject: ada: Fix error message for Aggregate aspect X-Git-Tag: basepoints/gcc-15~8915 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec48b99c24a422bf97af91e82203d23b69094e7c;p=thirdparty%2Fgcc.git 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 --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 6f9fe738ddd9..593e6f8c1690 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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;