summaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-26 11:11:10 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-26 11:11:10 +0000
commitd26e54e89736fa25ca9faf044068b4d8ee5ce134 (patch)
tree663091dba858d839d1757e513d32128240109ff1 /gcc/ada/sinfo.adb
parent4218b4e2cf26f1805796fd4282b8031c5b05f10f (diff)
downloadgcc-d26e54e89736fa25ca9faf044068b4d8ee5ce134.tar.gz
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb: Handle subprogram bodies without previous specs. 2015-10-26 Claire Dross <dross@adacore.com> * a-nudira.ads: Specify appropriate SPARK_Mode so that the unit can be used in SPARK code. 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com> * contracts.adb (Analyze_Subprogram_Body_Contract): Do not analyze pragmas Refined_Global and Refined_Depends because these pragmas are now fully analyzed when encountered. (Inherit_Pragma): Update the call to attribute Is_Inherited. * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Depends_Global): New parameter profile and comment on usage. Do not fully analyze the pragma, this is now done at the outer level. (Analyze_Depends_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_External_Property_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Initial_Condition_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Initializes_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Pragma): Reset the Analyzed flag on various pragmas that require delayed full analysis. Contract_Cases is now analyzed immediately when it applies to a subprogram body stub. Pragmas Depends, Global, Refined_Depends and Refined_Global are now analyzed in pairs when they appear in a subprogram body [stub]. (Analyze_Pre_Post_Condition_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Refined_Depends_Global_Post): Update the comment on usage. (Analyze_Refined_Depends_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Refined_Global_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Refined_State_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Analyze_Test_Case_In_Decl_Part): Add a guard to prevent reanalysis. Mark the pragma as analyzed at the end of the processing. (Is_Followed_By_Pragma): New routine. * sinfo.adb (Is_Analyzed_Pragma): New routine. (Is_Inherited): Renamed to Is_Inherited_Pragma. (Set_Is_Analyzed_Pragma): New routine. (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma. * sinfo.ads Rename attribute Is_Inherited to Is_Inherited_Pragma and update occurrences in nodes. (Is_Analyzed_Pragma): New routine along with pragma Inline. (Is_Inherited): Renamed to Is_Inherited_Pragma along with pragma Inline. (Set_Is_Analyzed_Pragma): New routine along with pragma Inline. (Set_Is_Inherited): Renamed to Set_Is_Inherited_Pragma along with pragma Inline. 2015-10-26 Ed Schonberg <schonberg@adacore.com> * par-ch3.adb (P_Component_Items): When style checks are enabled, apply them to component declarations in a record type declaration or extension. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229330 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb24
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 7f2d9a8fd88..5f57e8c2f75 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -1760,6 +1760,14 @@ package body Sinfo is
return Flag13 (N);
end Is_Accessibility_Actual;
+ function Is_Analyzed_Pragma
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Pragma);
+ return Flag5 (N);
+ end Is_Analyzed_Pragma;
+
function Is_Asynchronous_Call_Block
(N : Node_Id) return Boolean is
begin
@@ -1918,13 +1926,13 @@ package body Sinfo is
return Flag11 (N);
end Is_In_Discriminant_Check;
- function Is_Inherited
+ function Is_Inherited_Pragma
(N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_Pragma);
return Flag4 (N);
- end Is_Inherited;
+ end Is_Inherited_Pragma;
function Is_Machine_Number
(N : Node_Id) return Boolean is
@@ -4991,6 +4999,14 @@ package body Sinfo is
Set_Flag13 (N, Val);
end Set_Is_Accessibility_Actual;
+ procedure Set_Is_Analyzed_Pragma
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Pragma);
+ Set_Flag5 (N, Val);
+ end Set_Is_Analyzed_Pragma;
+
procedure Set_Is_Asynchronous_Call_Block
(N : Node_Id; Val : Boolean := True) is
begin
@@ -5149,13 +5165,13 @@ package body Sinfo is
Set_Flag11 (N, Val);
end Set_Is_In_Discriminant_Check;
- procedure Set_Is_Inherited
+ procedure Set_Is_Inherited_Pragma
(N : Node_Id; Val : Boolean := True) is
begin
pragma Assert (False
or else NT (N).Nkind = N_Pragma);
Set_Flag4 (N, Val);
- end Set_Is_Inherited;
+ end Set_Is_Inherited_Pragma;
procedure Set_Is_Machine_Number
(N : Node_Id; Val : Boolean := True) is