]> gcc.gnu.org Git - gcc.git/commit - gcc/ada/sem_res.adb
2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
authorHristian Kirtchev <kirtchev@adacore.com>
Tue, 20 Oct 2015 10:43:21 +0000 (10:43 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 20 Oct 2015 10:43:21 +0000 (12:43 +0200)
commit847d950d3a26b03229a289bfaa5163a5352ed7f4
tree587d6e17c6aaca334c98dbdcda61607840f87327
parente42d2186bdf3c9de8316e718b330f0c3c3701e58
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb Add aspect Volatile_Function to table
Canonical_Aspect.
* aspect.ads Add aspect Volatile_Function to tables
Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
and Implementation_Defined_Aspect.  Aspects Async_Readers,
Async_Writers, Effective_Reads and Effective_Writes are no
longer Boolean.
* einfo.adb (Get_Pragma): Add an entry for pragma
Volatile_Function.
* par-prag.adb (Prag): Pragma Volatile_Function does not need
special processing by the parser.
* rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
* sem_ch3.adb Fix SPARK RM references.
(Analyze_Object_Contract): Update the error guard.
* sem_ch5.adb Fix SPARK RM references.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
that a non-volatile function does not contain an effectively
volatile parameter.
(Analyze_Subprogram_Contract): Ensure
that a non-volatile function does not contain an effectively
volatile parameter.
* sem_ch12.adb (Instantiate_Object): Remove the reference to
the SPARK RM from the error message.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add
processing for aspects Async_Readers, Async_Writers,
Effective_Reads, Effective_Writes and Volatile_Function.
(Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
Async_Writers, Effective_Reads, Effective_Writes and
Volatile_Function do not need special processing at the freeze
point.
* sem_prag.adb Add an entry for pragma Volatile_Function in
table Sig_Flags.
(Analyze_External_Property_In_Decl_Part):
Reimplemented as Async_Readers, Async_Writers, Effective_Reads
and Effective_Writes are no longer Boolean pragmas.
(Analyze_Global_Item): An external state or effectively
volatile object cannot appear as an item in pragma
[Refined_]Global.
(Analyze_Pragma): Change the implementation
of Async_Readers, Async_Writers, Effective_Reads and
Effective_Writes as these are no longer Boolean pragmas.
Use routine Check_Static_Boolean_Expression to verify the
optional Boolean expression of Async_Readers, Async_Writers,
Constant_After_Elaboration, Effective_Reads, Effective_Writes,
Extensions_Visible and Volatile_Function.  Add processing for
pragma Volatile_Function.
(Check_Static_Boolean_Expression): New routine.
(Find_Related_Context): Update the comment on usage.
(Is_Enabled_Pragma): New routine.
* sem_prag.ads (Is_Enabled_Pragma): New routine.
* sem_res.adb Fix SPARK RM references.
(Is_OK_Volatile_Context): Add detection for return statements.
(Resolve_Actuals): Remove the check concerning an effectively volatile
OUT actual parameter as this is now done by the SPARK flow analyzer.
(Resolve_Entity_Name): Remove the check concerning an effectively
volatile OUT formal parameter as this is now done by the SPARK
flow analyzer. (Within_Volatile_Function): New routine.
* sem_util.adb (Add_Contract_Item): Add processing for pragma
Volatile_Function.
(Check_Nonvolatile_Function_Profile): New routine.
(Is_Descendant_Of_Suspension_Object): New routine.
(Is_Effectively_Volatile): Protected types and descendants of
Suspension_Object are now treated as effectively volatile.
(Is_Enabled): The optional Boolean expression of pragmas
Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
now appears as the first argument.
(Is_Volatile_Function): New routine.
* sem_util.ads Add SPARK RM references.
(Add_Contract_Item): Update the comment on usage.
(Check_Nonvolatile_Function_Profile): New routine.
(Is_Effectively_Volatile): Update the comment on usage.
(Is_Volatile_Function): New routine.
* snames.ads-tmpl Add a predefined name and pragma id for
Volatile_Function.

From-SVN: r229047
17 files changed:
gcc/ada/ChangeLog
gcc/ada/aspects.adb
gcc/ada/aspects.ads
gcc/ada/einfo.adb
gcc/ada/par-prag.adb
gcc/ada/rtsfind.ads
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch5.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_prag.ads
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
gcc/ada/snames.ads-tmpl
This page took 0.059873 seconds and 5 git commands to generate.