diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-18 14:53:58 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-18 14:53:58 +0100 |
commit | e645cb39bb491e2a9b30ce4b7717bb2e23da0b88 (patch) | |
tree | d04e46fb5f98bf3905e826724cc00a52afbd27b4 /gcc/ada/sem_prag.ads | |
parent | 33f47f427920586a6f21dd8f1b1adc582b9fb7af (diff) | |
download | gcc-e645cb39bb491e2a9b30ce4b7717bb2e23da0b88.zip gcc-e645cb39bb491e2a9b30ce4b7717bb2e23da0b88.tar.gz gcc-e645cb39bb491e2a9b30ce4b7717bb2e23da0b88.tar.bz2 |
[multiple changes]
2015-11-18 Nicolas Roche <roche@adacore.com>
* sysdep.c (__gnat_localtime_tzoff): On Windows platform
GetTimeZoneInformation function is thread-safe. Thus there
is no need to lock the runtime in the implementation of
__gnat_localtime_tzoff on that platform.
2015-11-18 Eric Botcazou <ebotcazou@adacore.com>
* s-arit64.adb (To_Neg_Int): Add a special case for 2**63 input.
2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Contracts): New routine.
(Analyze_Enclosing_Package_Body_Contract): Removed.
(Analyze_Entry_Or_Subprogram_Contract): Add formal parameter
Freeze_Id. Propagate the entity of the freezing body to vaious
analysis routines.
(Analyze_Initial_Declaration_Contract): Removed.
(Analyze_Object_Contract): Add formal parameter
Freeze_Id. Propagate the entity of the freezing body to vaious
analysis routines.
(Analyze_Previous_Contracts): New routine.
* contracts.ads (Analyze_Enclosing_Package_Body_Contract): Removed.
(Analyze_Contracts): New routine.
(Analyze_Entry_Or_Subprogram_Contract): Add formal
parameter Freeze_Id and update the comment on usage.
(Analyze_Initial_Declaration_Contract): Removed.
(Analyze_Object_Contract): Add formal parameter Freeze_Id and
update the comment on usage.
(Analyze_Previous_Contracts): New routine.
* sem_ch3.adb (Analyze_Declarations): Use Analyze_Contracts to
analyze all contracts of eligible constructs.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body):
A body no longer freezes the contract of its initial
declaration. This effect is achieved through different means.
(Analyze_Subprogram_Body_Helper): A body now freezes the contracts
of all eligible constructs that precede it. A body no longer
freezes the contract of its initial declaration. This effect is
achieved through different means.
* sem_ch7.adb (Analyze_Package_Body_Helper): A body now freezes
the contracts of all eligible constructs that precede it. A body
no longer freezes the contract of its initial declaration. This
effect is achieved through different means.
* sem_ch9.adb (Analyze_Entry_Body): A body now freezes
the contracts of all eligible constructs that precede
it. A body no longer freezes the contract of its initial
declaration. This effect is achieved through different means.
(Analyze_Protected_Body): A body now freezes the contracts
of all eligible constructs that precede it. A body no longer
freezes the contract of its initial declaration. This effect
is achieved through different means.
(Analyze_Task_Body): A
body now freezes the contracts of all eligible constructs that
precede it. A body no longer freezes the contract of its initial
declaration. This effect is achieved through different means.
* sem_prag.adb (Add_Item_To_Name_Buffer): Single protected/task
objects now output their respective current instance of xxx
type messages. (Analyze_Contract_Cases_In_Decl_Part): Add
formal parameter Freeze_Id. Emit a clarification message
when an undefined entity may the byproduct of contract
freezing.
(Analyze_Part_Of_In_Decl_Part): Add formal
parameter Freeze_Id. Emit a clarification message when an
undefined entity may the byproduct of contract freezing.
(Analyze_Pre_Post_Condition_In_Decl_Part): Add formal
parameter Freeze_Id. Emit a clarification message when an
undefined entity may the byproduct of contract freezing.
(Analyze_Refined_State_In_Decl_Part): Do not report unused body
states as constituents of single protected/task types may not
bave been identified yet.
(Collect_Subprogram_Inputs_Outputs):
Reimplemented. (Contract_Freeze_Error): New routine.
(Process_Overloadable): Use predicate Is_Single_Task_Object.
* sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part):
Add formal parameter Freeze_Id and update the comment
on usage.
(Analyze_Part_Of_In_Decl_Part): Add formal
parameter Freeze_Id and update the comment on usage.
(Analyze_Pre_Post_Condition_In_Decl_Part): Add formal parameter
Freeze_Id and update the comment on usage.
* sem_util.adb (Check_Unused_Body_States): Remove global
variable Legal_Constits. The routine now reports unused
body states regardless of whether constituents are
legal or not.
(Collect_Body_States): A constituent of a
single protected/task type is not a visible state of a
package body.
(Collect_Visible_States): A constituent
of a single protected/task type is not a visible
state of a package body.
(Has_Undefined_Reference): New routine.
(Is_Single_Concurrent_Object): Reimplemented.
(Is_Single_Protected_Object): New routine.
(Is_Single_Task_Object): New routine.
(Is_Visible_Object): New routine.
(Report_Unused_Body_States): Moved to Check_Unused_Body_States.
* sem_util.ads (Check_Unused_Body_States): Update the comment on usage.
(Has_Undefined_Reference): New routine.
(Is_Single_Protected_Object): New routine.
(Is_Single_Task_Object): New routine.
(Report_Unused_Body_States): Moved to Check_Unused_Body_States.
2015-11-18 Pierre-Marie de Rodat <derodat@adacore.com>
* Makefile.rtl, impunit.adb: Add g-strhas.ads.
* g-strhas.ads: New file.
* s-strhas.ads: Add a comment to redirect users to g-strhas.ads.
2015-11-18 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_Internal_Call_Continue): Fix the case
where the call in question is to a renaming of a subprogram that
can be safely called without ABE.
* checks.adb: Minor edits.
From-SVN: r230546
Diffstat (limited to 'gcc/ada/sem_prag.ads')
-rw-r--r-- | gcc/ada/sem_prag.ads | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index a4e0bd8..ce05bfd 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -181,8 +181,12 @@ package Sem_Prag is procedure Analyze_Pragma (N : Node_Id); -- Analyze procedure for pragma reference node N - procedure Analyze_Contract_Cases_In_Decl_Part (N : Node_Id); - -- Perform full analysis of delayed pragma Contract_Cases + procedure Analyze_Contract_Cases_In_Decl_Part + (N : Node_Id; + Freeze_Id : Entity_Id := Empty); + -- Perform full analysis of delayed pragma Contract_Cases. Freeze_Id is the + -- entity of [generic] package body or [generic] subprogram body which + -- caused "freezing" of the related contract where the pragma resides. procedure Analyze_Depends_In_Decl_Part (N : Node_Id); -- Perform full analysis of delayed pragma Depends. This routine is also @@ -205,11 +209,20 @@ package Sem_Prag is procedure Analyze_Initializes_In_Decl_Part (N : Node_Id); -- Perform full analysis of delayed pragma Initializes - procedure Analyze_Part_Of_In_Decl_Part (N : Node_Id); - -- Perform full analysis of delayed pragma Part_Of + procedure Analyze_Part_Of_In_Decl_Part + (N : Node_Id; + Freeze_Id : Entity_Id := Empty); + -- Perform full analysis of delayed pragma Part_Of. Freeze_Id is the entity + -- of [generic] package body or [generic] subprogram body which caused the + -- "freezing" of the related contract where the pragma resides. - procedure Analyze_Pre_Post_Condition_In_Decl_Part (N : Node_Id); - -- Perform full analysis of pragmas Precondition and Postcondition + procedure Analyze_Pre_Post_Condition_In_Decl_Part + (N : Node_Id; + Freeze_Id : Entity_Id := Empty); + -- Perform full analysis of pragmas Precondition and Postcondition. + -- Freeze_Id denotes the entity of [generic] package body or [generic] + -- subprogram body which caused "freezing" of the related contract where + -- the pragma resides. procedure Analyze_Refined_Depends_In_Decl_Part (N : Node_Id); -- Preform full analysis of delayed pragma Refined_Depends. This routine |