diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-02-14 18:06:36 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-05-16 10:49:26 +0200 |
commit | 492f896e3a224a09c5f693249dc302dda435fae7 (patch) | |
tree | 0e4616224b742578a85da64a5a4c6ebd95e09940 | |
parent | 1d992c40e77fa61ebdb75d1342b35f58b9b98f12 (diff) | |
download | gcc-492f896e3a224a09c5f693249dc302dda435fae7.zip gcc-492f896e3a224a09c5f693249dc302dda435fae7.tar.gz gcc-492f896e3a224a09c5f693249dc302dda435fae7.tar.bz2 |
ada: Cleanup reporting locations for Ada 2022 and GNAT extension aspects
Code cleanup; semantics is unaffected.
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Specification): Consistently
reuse existing constant where possible.
-rw-r--r-- | gcc/ada/sem_ch13.adb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 8bc8e84..ce9f15c 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2417,7 +2417,7 @@ package body Sem_Ch13 is begin if Ada_Version < Ada_2022 then - Error_Msg_Ada_2022_Feature ("aspect %", Sloc (Aspect)); + Error_Msg_Ada_2022_Feature ("aspect %", Loc); return; end if; @@ -2442,7 +2442,7 @@ package body Sem_Ch13 is elsif Is_Imported_Intrinsic then Error_Msg_GNAT_Extension - ("aspect % on intrinsic function", Sloc (Aspect), + ("aspect % on intrinsic function", Loc, Is_Core_Extension => True); else @@ -4133,7 +4133,7 @@ package body Sem_Ch13 is when Aspect_Designated_Storage_Model => if not All_Extensions_Allowed then - Error_Msg_GNAT_Extension ("aspect %", Sloc (Aspect)); + Error_Msg_GNAT_Extension ("aspect %", Loc); elsif not Is_Type (E) or else Ekind (E) /= E_Access_Type @@ -4148,7 +4148,7 @@ package body Sem_Ch13 is when Aspect_Storage_Model_Type => if not All_Extensions_Allowed then - Error_Msg_GNAT_Extension ("aspect %", Sloc (Aspect)); + Error_Msg_GNAT_Extension ("aspect %", Loc); elsif not Is_Type (E) or else not Is_Immutably_Limited_Type (E) @@ -4479,7 +4479,7 @@ package body Sem_Ch13 is -- Ada 2022 (AI12-0363): Full_Access_Only elsif A_Id = Aspect_Full_Access_Only then - Error_Msg_Ada_2022_Feature ("aspect %", Sloc (Aspect)); + Error_Msg_Ada_2022_Feature ("aspect %", Loc); -- Ada 2022 (AI12-0075): static expression functions |