diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-03-03 17:45:20 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-25 09:44:17 +0200 |
commit | 2288b12cfe60f7bf65f382951449b070f9067da7 (patch) | |
tree | 8215084c36a4fae64ecc4b2dc84e8e4c9812e194 | |
parent | 0d569d97504d75e0499ce29ad64226629f67645a (diff) | |
download | gcc-2288b12cfe60f7bf65f382951449b070f9067da7.zip gcc-2288b12cfe60f7bf65f382951449b070f9067da7.tar.gz gcc-2288b12cfe60f7bf65f382951449b070f9067da7.tar.bz2 |
ada: Add missing supportive code for recently added SPARK aspects
Fix minor inconsistencies with the recently added SPARK aspects
Exceptional_Cases and Subprogram_Variant, whose implementation is based
on Contract_Cases.
gcc/ada/
* aspects.ads
(Implementation_Defined_Aspect): Recently added aspects are
implementation-defined, just like Contract_Cases.
* sem_prag.ads
(Aspect_Specifying_Pragma): Recently added aspects have corresponding
pragmas, just like Contract_Cases.
(Pragma_Significant_To_Subprograms): Recently added aspects are
significant to subprograms, just like Contract_Cases.
-rw-r--r-- | gcc/ada/aspects.ads | 2 | ||||
-rw-r--r-- | gcc/ada/sem_prag.ads | 46 |
2 files changed, 27 insertions, 21 deletions
diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads index 6670b64..5771967 100644 --- a/gcc/ada/aspects.ads +++ b/gcc/ada/aspects.ads @@ -270,6 +270,7 @@ package Aspects is Aspect_Dimension_System => True, Aspect_Effective_Reads => True, Aspect_Effective_Writes => True, + Aspect_Exceptional_Cases => True, Aspect_Extensions_Visible => True, Aspect_Favor_Top_Level => True, Aspect_Ghost => True, @@ -292,6 +293,7 @@ package Aspects is Aspect_Shared => True, Aspect_Simple_Storage_Pool => True, Aspect_Simple_Storage_Pool_Type => True, + Aspect_Subprogram_Variant => True, Aspect_Suppress_Debug_Info => True, Aspect_Suppress_Initialization => True, Aspect_Thread_Local_Storage => True, diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 993ff7a..cbeb815 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -59,6 +59,7 @@ package Sem_Prag is Pragma_Effective_Reads => True, Pragma_Effective_Writes => True, Pragma_Elaborate_Body => True, + Pragma_Exceptional_Cases => True, Pragma_Export => True, Pragma_Extensions_Visible => True, Pragma_Favor_Top_Level => True, @@ -109,6 +110,7 @@ package Sem_Prag is Pragma_Simple_Storage_Pool_Type => True, Pragma_SPARK_Mode => True, Pragma_Storage_Size => True, + Pragma_Subprogram_Variant => True, Pragma_Suppress => True, Pragma_Suppress_Debug_Info => True, Pragma_Suppress_Initialization => True, @@ -208,27 +210,29 @@ package Sem_Prag is -- of subprogram bodies. Pragma_Significant_To_Subprograms : constant array (Pragma_Id) of Boolean := - (Pragma_Contract_Cases => True, - Pragma_Depends => True, - Pragma_Ghost => True, - Pragma_Global => True, - Pragma_Inline => True, - Pragma_Inline_Always => True, - Pragma_Post => True, - Pragma_Post_Class => True, - Pragma_Postcondition => True, - Pragma_Pre => True, - Pragma_Pre_Class => True, - Pragma_Precondition => True, - Pragma_Pure => True, - Pragma_Pure_Function => True, - Pragma_Refined_Depends => True, - Pragma_Refined_Global => True, - Pragma_Refined_Post => True, - Pragma_Refined_State => True, - Pragma_Volatile => True, - Pragma_Volatile_Function => True, - others => False); + (Pragma_Contract_Cases => True, + Pragma_Depends => True, + Pragma_Exceptional_Cases => True, + Pragma_Ghost => True, + Pragma_Global => True, + Pragma_Inline => True, + Pragma_Inline_Always => True, + Pragma_Post => True, + Pragma_Post_Class => True, + Pragma_Postcondition => True, + Pragma_Pre => True, + Pragma_Pre_Class => True, + Pragma_Precondition => True, + Pragma_Pure => True, + Pragma_Pure_Function => True, + Pragma_Refined_Depends => True, + Pragma_Refined_Global => True, + Pragma_Refined_Post => True, + Pragma_Refined_State => True, + Pragma_Subprogram_Variant => True, + Pragma_Volatile => True, + Pragma_Volatile_Function => True, + others => False); ----------------- -- Subprograms -- |