diff options
Diffstat (limited to 'gcc/ada/exp_prag.adb')
-rw-r--r-- | gcc/ada/exp_prag.adb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb index c6b3bed..e660196 100644 --- a/gcc/ada/exp_prag.adb +++ b/gcc/ada/exp_prag.adb @@ -1978,6 +1978,47 @@ package body Exp_Prag is In_Assertion_Expr := In_Assertion_Expr - 1; end Expand_Pragma_Contract_Cases; + ------------------------------------- + -- Expand_Pragma_Exceptional_Cases -- + ------------------------------------- + + -- Aspect Exceptional_Cases shoule be expanded in the following manner: + + -- Original declaration + + -- procedure P (...) with + -- Exceptional_Cases => + -- (Exp_1 => True, + -- Exp_2 => Post_4); + + -- Expanded body + + -- procedure P (...) is + -- begin + -- -- normal body of of P + -- declare + -- ... + -- end; + -- + -- exception + -- when Exp1 => + -- pragma Assert (True); + -- raise; + -- when E : Exp2 => + -- pragma Assert (Post_4); + -- raise; + -- when others => + -- pragma Assert (False); + -- raise; + -- end P; + + procedure Expand_Pragma_Exceptional_Cases (Prag : Node_Id) is + begin + -- Currently we don't expand this pragma + + Rewrite (Prag, Make_Null_Statement (Sloc (Prag))); + end Expand_Pragma_Exceptional_Cases; + --------------------------------------- -- Expand_Pragma_Import_Or_Interface -- --------------------------------------- |