diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-03-13 10:59:47 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-25 09:44:19 +0200 |
commit | 48d9c15fa8a05a9ac541b1468a8eaa4bf94ff3f6 (patch) | |
tree | 7bcb37512b2e8be6e31e6b4cc6af73d2449f316d /gcc | |
parent | 93d0457ec9c03acd009eef3cd5b725172e988648 (diff) | |
download | gcc-48d9c15fa8a05a9ac541b1468a8eaa4bf94ff3f6.zip gcc-48d9c15fa8a05a9ac541b1468a8eaa4bf94ff3f6.tar.gz gcc-48d9c15fa8a05a9ac541b1468a8eaa4bf94ff3f6.tar.bz2 |
ada: Expect Exceptional_Cases as a context for attribute Old
When determining whether attribute Old is evaluated conditionally, we
must also expect it to appear in the recently added contract
Exceptional_Cases.
gcc/ada/
* sem_util.adb (Determining_Expressions): Fix style; fix layout and
ordering of pragma names; expect pragma Exceptional_Cases.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_util.adb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 6b5abc9..aabd017 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -30651,9 +30651,9 @@ package body Sem_Util is (Expr : Node_Id; Expr_Trailer : Node_Id := Empty) return Determining_Expression_List is - Par : Node_Id := Expr; - Trailer : Node_Id := Expr_Trailer; - Next_Element : Determining_Expr; + Par : Node_Id := Expr; + Trailer : Node_Id := Expr_Trailer; + Next_Element : Determining_Expr; begin -- We want to stop climbing up the tree when we reach the -- postcondition expression. An aspect_specification is @@ -30761,9 +30761,13 @@ package body Sem_Util is else pragma Assert (Get_Pragma_Id (Pragma_Name (Par)) in - Pragma_Post | Pragma_Postcondition - | Pragma_Post_Class | Pragma_Refined_Post - | Pragma_Check | Pragma_Contract_Cases); + Pragma_Check + | Pragma_Contract_Cases + | Pragma_Exceptional_Cases + | Pragma_Post + | Pragma_Postcondition + | Pragma_Post_Class + | Pragma_Refined_Post); return (1 .. 0 => <>); -- recursion terminates here end if; |