]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix error on Designated_Storage_Model with extensions disabled
authorRonan Desplanques <desplanques@adacore.com>
Tue, 17 Jun 2025 08:13:20 +0000 (10:13 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 4 Jul 2025 08:17:03 +0000 (10:17 +0200)
The format string used for the error in that case requires setting the
Error_Msg_Name_1 global variable. This was not done so this patch adds
the missing assignment.

gcc/ada/ChangeLog:

* sem_ch13.adb (Analyze_Aspect_Specifications): Fix error emission.

gcc/ada/sem_ch13.adb

index 072ec66a8f3dd585626cdfcea2e511fb5e585a98..99d642d65ee99e45394be5b35cb7c5ddcef84a2b 100644 (file)
@@ -4279,6 +4279,7 @@ package body Sem_Ch13 is
 
                when Aspect_Designated_Storage_Model =>
                   if not All_Extensions_Allowed then
+                     Error_Msg_Name_1 := Nam;
                      Error_Msg_GNAT_Extension ("aspect %", Loc);
                      goto Continue;