diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-12-09 14:44:00 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-04-28 05:38:13 -0400 |
commit | 88fd22e721c32580610d1756701cef892e713ad8 (patch) | |
tree | 51dc92150298c9592cc17814d8cc2aefd3fb37cc /gcc | |
parent | 189c58042ddde50ab07ee105d14c7a24d05f9482 (diff) | |
download | gcc-88fd22e721c32580610d1756701cef892e713ad8.zip gcc-88fd22e721c32580610d1756701cef892e713ad8.tar.gz gcc-88fd22e721c32580610d1756701cef892e713ad8.tar.bz2 |
[Ada] Consistent diagnostic on missing -gnat2020 switch for aspects
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Static): Reuse
Error_Msg_Ada_2020_Feature for aspect Static.
(Analyze_One_Aspect): Likewise for aspect Full_Access.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 25e3bd7..6af3238 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2500,10 +2500,7 @@ package body Sem_Ch13 is begin if Ada_Version < Ada_2020 then - Error_Msg_N - ("aspect % is an Ada 202x feature", Aspect); - Error_Msg_N ("\compile with -gnat2020", Aspect); - + Error_Msg_Ada_2020_Feature ("aspect %", Sloc (Aspect)); return; end if; @@ -4575,11 +4572,7 @@ package body Sem_Ch13 is -- Ada 202x (AI12-0363): Full_Access_Only elsif A_Id = Aspect_Full_Access_Only then - if Ada_Version < Ada_2020 then - Error_Msg_N - ("aspect % is an Ada 202x feature", Aspect); - Error_Msg_N ("\compile with -gnat2020", Aspect); - end if; + Error_Msg_Ada_2020_Feature ("aspect %", Sloc (Aspect)); -- Ada 202x (AI12-0075): static expression functions |