aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël AMIARD <amiard@adacore.com>2024-09-13 15:30:03 +0200
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-10-25 11:09:00 +0200
commitc2673f56cc13208ee401a4feda690a0e377d55c7 (patch)
treedade411e8a008b2acaeb9ba18491d8fe26cca6dc
parent104f8ad0ad4e0adb542bcf062c6a1009661fb4c1 (diff)
downloadgcc-c2673f56cc13208ee401a4feda690a0e377d55c7.zip
gcc-c2673f56cc13208ee401a4feda690a0e377d55c7.tar.gz
gcc-c2673f56cc13208ee401a4feda690a0e377d55c7.tar.bz2
ada: Put Finalizable aspect in -gnatX
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
-rw-r--r--gcc/ada/exp_util.adb2
-rw-r--r--gcc/ada/sem_ch13.adb5
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 8b9ce9a..400d5d8 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -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);
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 953da67..1154577 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -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