diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 11:21:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 11:21:32 +0000 |
commit | c8af2df9793abebdc2ba9088aa7095779a72b577 (patch) | |
tree | c8503545c9acec5c331a2ce08b95dbe7d391687e /gcc/ada/sem_prag.adb | |
parent | 47a467474ca6f911ffd8b32ffd13b9abf1a8ef0a (diff) | |
download | gcc-c8af2df9793abebdc2ba9088aa7095779a72b577.tar.gz |
2012-12-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb (Traverse_Aspects): Ensure we always have
an entry in the sloc -> SCO map for invariants, since
Set_SCO_Pragma_Enabled is called with that sloc when checks
are enabled.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb: Minor reformatting.
2012-12-05 Hristian Kirtchev <kirtchev@adacore.com>
* par-prag.adb: Checks and processing of pragma Assume are
carried out by Sem_Prag.
* sem_prag.adb (Analyze_Pragma): Check the legality of pragma
Assume.
* snames.ads-tmpl: Add new name Assume. Add a pragma identifier
for Assume.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194215 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index be5afe028a6..36251b8bad1 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -2233,6 +2233,18 @@ package body Sem_Prag is (Get_Pragma_Arg (Arg2), Standard_String); end if; + -- For a pragma in the extended main source unit, record enabled + -- status in SCO. + + -- This may seem redundant with the call to Check_Enabled occurring + -- later on when the pragma is rewritten into a pragma Check but + -- is actually required in the case of a postcondition within a + -- generic. + + if Check_Enabled (Pname) and then not Split_PPC (N) then + Set_SCO_Pragma_Enabled (Loc); + end if; + -- If we are within an inlined body, the legality of the pragma -- has been checked already. @@ -6995,6 +7007,21 @@ package body Sem_Prag is Opt.Check_Policy_List := N; end Assertion_Policy; + ------------ + -- Assume -- + ------------ + + -- pragma Assume (boolean_EXPRESSION); + + when Pragma_Assume => Assume : declare + begin + GNAT_Pragma; + S14_Pragma; + Check_Arg_Count (1); + + Analyze_And_Resolve (Expression (Arg1), Any_Boolean); + end Assume; + ------------------------------ -- Assume_No_Invalid_Values -- ------------------------------ @@ -15668,6 +15695,7 @@ package body Sem_Prag is Pragma_Assert => -1, Pragma_Assert_And_Cut => -1, Pragma_Assertion_Policy => 0, + Pragma_Assume => 0, Pragma_Assume_No_Invalid_Values => 0, Pragma_Attribute_Definition => +3, Pragma_Asynchronous => -1, |