]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Put Finalizable aspect in -gnatX
authorRaphaël AMIARD <amiard@adacore.com>
Fri, 13 Sep 2024 13:30:03 +0000 (15:30 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 25 Oct 2024 09:09:00 +0000 (11:09 +0200)
gcc/ada/ChangeLog:

* sem_ch13.adb (Analyze_One_Aspect): change the call to
`Error_Msg_GNAT_Extension` to allow this aspect in core
extensions. Put the code path in core extensions.
* exp_util.adb (Name_Of_Controlled_Prim_Op): Put the code path
in core extensions

gcc/ada/exp_util.adb
gcc/ada/sem_ch13.adb

index 8b9ce9a2acc5a312982d0ec4d03080c55133fdb3..400d5d86fbaf89f07cabed9cf44a2ee1423fdaa4 100644 (file)
@@ -11574,7 +11574,7 @@ package body Exp_Util is
       --  The aspect Finalizable may change the name of the primitives when
       --  present, but it's a GNAT extension.
 
-      if All_Extensions_Allowed then
+      if Core_Extensions_Allowed then
          declare
             Rep : constant Node_Id :=
               Get_Rep_Item (Typ, Name_Finalizable, Check_Parents => True);
index 953da67c9d37132c461db376ad158b67321174b6..11545771030e27ea682c261cac6aa82ea0531703 100644 (file)
@@ -4073,9 +4073,10 @@ package body Sem_Ch13 is
                   end if;
 
                when Aspect_Finalizable =>
-                  if not All_Extensions_Allowed then
+                  if not Core_Extensions_Allowed then
                      Error_Msg_Name_1 := Nam;
-                     Error_Msg_GNAT_Extension ("aspect %", Loc);
+                     Error_Msg_GNAT_Extension
+                       ("aspect %", Loc, Is_Core_Extension => True);
                      goto Continue;
 
                   elsif not Is_Type (E) then