diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-24 13:19:24 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-24 13:19:24 +0000 |
commit | 6c73bbed49abc4402291b9d8c41dfb48508ef4e8 (patch) | |
tree | ec7f0d0fcbdadb1b0fa356643c01712691aa2a6b /gcc/ada/sem_prag.adb | |
parent | 36f6506123e49d090499dfb199a487aa7a44f39e (diff) | |
download | gcc-6c73bbed49abc4402291b9d8c41dfb48508ef4e8.tar.gz |
2013-04-24 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document pragma Assume.
* sem_prag.adb (Analyze_Pragma, case Assume): Now processed as
part of Assert, and no longer requires -gnatd.F
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198231 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0b3b72cc8e3..c89ca848743 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -8828,9 +8828,9 @@ package body Sem_Prag is end if; end Annotate; - --------------------------- - -- Assert/Assert_And_Cut -- - --------------------------- + ---------------------------------- + -- Assert/Assert_And_Cut/Assume -- + ---------------------------------- -- pragma Assert -- ( [Check => ] Boolean_EXPRESSION @@ -8840,7 +8840,14 @@ package body Sem_Prag is -- ( [Check => ] Boolean_EXPRESSION -- [, [Message =>] Static_String_EXPRESSION]); - when Pragma_Assert | Pragma_Assert_And_Cut => Assert : declare + -- pragma Assume + -- ( [Check => ] Boolean_EXPRESSION + -- [, [Message =>] Static_String_EXPRESSION]); + + when Pragma_Assert | + Pragma_Assert_And_Cut | + Pragma_Assume => + Assert : declare Expr : Node_Id; Newa : List_Id; @@ -9056,35 +9063,6 @@ package body Sem_Prag is end if; end Assertion_Policy; - ------------ - -- Assume -- - ------------ - - -- pragma Assume (boolean_EXPRESSION); - - when Pragma_Assume => Assume : declare - begin - GNAT_Pragma; - S14_Pragma; - Check_Arg_Count (1); - - -- Pragma Assume is transformed into pragma Check in the following - -- manner: - - -- pragma Check (Assume, Expr); - - Rewrite (N, - Make_Pragma (Loc, - Chars => Name_Check, - Pragma_Argument_Associations => New_List ( - Make_Pragma_Argument_Association (Loc, - Expression => Make_Identifier (Loc, Name_Assume)), - - Make_Pragma_Argument_Association (Loc, - Expression => Relocate_Node (Expression (Arg1)))))); - Analyze (N); - end Assume; - ------------------------------ -- Assume_No_Invalid_Values -- ------------------------------ |