aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2013-04-12 13:17:28 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-12 15:17:28 +0200
commita7e68e7fa76aa33eab48a30186abcb4d3b291322 (patch)
treec7c678d7b9c33b74d5c089d938c6fa6b9abda2eb /gcc/ada/sinfo.adb
parentd515aef32662568e230d2cc772c4a7da61ca64c0 (diff)
downloadgcc-a7e68e7fa76aa33eab48a30186abcb4d3b291322.zip
gcc-a7e68e7fa76aa33eab48a30186abcb4d3b291322.tar.gz
gcc-a7e68e7fa76aa33eab48a30186abcb4d3b291322.tar.bz2
aspects.adb: Alphabetize subprogram bodies in this unit.
2013-04-12 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb: Alphabetize subprogram bodies in this unit. Add an entry for Aspect_Ghost in the table of canonical aspects. (Has_Aspect): New routine. * aspects.ads: Add Aspect_Ghost to all relevant tables. Alphabetize subprograms in this unit. (Has_Aspect): New routine. * einfo.adb: Add with and use clauses for Aspects. (Is_Ghost_Function): New routine. * einfo.ads: Add new synthesized attribute Is_Ghost_Function and update the structure of the related nodes. (Is_Ghost_Function): New routine. * exp_ch4.adb (Find_Enclosing_Context): Use routine Is_Body_Or_Package_Declaration to terminate a search. (Is_Body_Or_Unit): Removed. * exp_util.adb (Within_Case_Or_If_Expression): Use routine Is_Body_Or_Package_Declaration to terminate a search. * par-prag.adb: Add pragma Ghost to the list of pragmas that do not need special processing by the parser. * sem_attr.adb (Analyze_Access_Attribute): Detect an illegal use of 'Access where the prefix is a ghost function. (Analyze_Attribute): Use routine Is_Body_Or_Package_Declaration to terminate a search. (Check_References_In_Prefix): Use routine Is_Body_Or_Package_Declaration to terminate a search. * sem_ch4.adb (Analyze_Call): Mark a function when it appears inside an assertion expression. Verify the legality of a call to a ghost function. (Check_Ghost_Function_Call): New routine. * sem_ch6.adb (Analyze_Function_Call): Code reformatting. Move the setting of attribute In_Assertion_Expression to Analyze_Call. (Check_Overriding_Indicator): Detect an illegal attempt to override a function with a ghost function. * sem_ch12.adb (Preanalyze_Actuals): Detect an illegal use of a ghost function as a generic actual. * sem_elab.adb (Check_Internal_Call_Continue): Update the call to In_Assertion. * sem_prag.adb: Add an entry for pragma Ghost in the table of significant arguments. (Analyze_Pragma): Do not analyze an "others" case guard. Add processing for pragma Ghost. Use Preanalyze_Assert_Expression when analyzing the expression of pragmas Loop_Invariant and Loop_Variant. * sem_util.adb (Get_Subprogram_Entity): Reimplemented. (Is_Body_Or_Package_Declaration): New routine. * sem_util.ads: Alphabetize subprotrams in this unit. (Is_Body_Or_Package_Declaration): New routine. * sinfo.adb (In_Assertion): Rename to In_Assertion_Expression. (Set_In_Assertion): Rename to Set_In_Assertion_Expression. * sinfo.ads: Rename flag In_Assertion to In_Assertion_Expression to better reflect its use. Update all places that mention the flag. (In_Assertion): Rename to In_Assertion_Expression. Update related pragma Inline. (Set_In_Assertion): Rename to Set_In_Assertion_Expression. Update related pragma Inline. * snames.ads-tmpl: Add new predefined name Ghost. Add new pragma id Pragma_Ghost. From-SVN: r197909
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 98dbe55..3c9096f 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -1640,13 +1640,13 @@ package body Sinfo is
return Flag16 (N);
end Import_Interface_Present;
- function In_Assertion
+ function In_Assertion_Expression
(N : Node_Id) return Boolean is
begin
pragma Assert (False
or else NT (N).Nkind = N_Function_Call);
return Flag4 (N);
- end In_Assertion;
+ end In_Assertion_Expression;
function In_Present
(N : Node_Id) return Boolean is
@@ -4722,13 +4722,13 @@ package body Sinfo is
Set_Flag16 (N, Val);
end Set_Import_Interface_Present;
- procedure Set_In_Assertion
+ procedure Set_In_Assertion_Expression
(N : Node_Id; Val : Boolean := True) is
begin
pragma Assert (False
or else NT (N).Nkind = N_Function_Call);
Set_Flag4 (N, Val);
- end Set_In_Assertion;
+ end Set_In_Assertion_Expression;
procedure Set_In_Present
(N : Node_Id; Val : Boolean := True) is