summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.ads
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2008-07-30 17:53:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-07-30 17:53:21 +0200
commitd44202ba07e54a1d61bebb53abc6133139e75e7d (patch)
treec7852aef0cf22d5feadc587c44e306ffefd2bfe5 /gcc/ada/sem_ch6.ads
parentdc829590914f5ae29de5f246319f5c37127c8ccd (diff)
downloadgcc-d44202ba07e54a1d61bebb53abc6133139e75e7d.tar.gz
einfo.adb: Flag245 is now used.
2008-07-30 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb: Flag245 is now used. (Is_Primitive_Wrapper, Set_Is_Primitive_Wrapper): Relax the assertion check to include functions. (Is_Private_Primitive, Set_Is_Private_Primitive): New subprograms. (Wrapped_Entity, Set_Wrapped_Entity): Relax the assertion check to include functions. (Write_Entity_Flags): Move flag Is_Primitive, add Is_Private_Primitive to the list of displayed flags. * einfo.ads: Update comment on the usage of Is_Primitive_Wrapper and Wrapped_Entity. These two flags are now present in functions. New flag Is_Private_Primitive. (Is_Private_Primitive, Set_Is_Private_Primitive): New subprograms. * exp_ch9.adb: (Build_Wrapper_Bodies): New subprogram. (Build_Wrapper_Body): The spec and body have been moved to in Build_Wrapper_ Bodies. Code cleanup. (Build_Wrapper_Spec): Moved to the spec of Exp_Ch9. Code cleanup. Wrappers are now generated for primitives declared between the private and full view of a concurrent type that implements an interface. (Build_Wrapper_Specs): New subprogram. (Expand_N_Protected_Body): Code reformatting. Replace the wrapper body creation mechanism with a call to Build_Wrapper_Bodies. (Expand_N_Protected_Type_Declaration): Code reformatting. Replace the wrapper spec creation mechanism with a call to Build_Wrapper_Specs. (Expand_N_Task_Body): Replace the wrapper body creation mechanism with a call to Build_Wrapper_Bodies. (Expand_N_Task_Type_Declaration): Replace the wrapper spec creation mechanism with a call to Build_Wrapper_Specs. (Is_Private_Primitive_Subprogram): New subprogram. (Overriding_Possible): Code cleanup. (Replicate_Entry_Formals): Renamed to Replicate_Formals, code cleanup. * exp_ch9.ads (Build_Wrapper_Spec): Moved from the body of Exp_Ch9. * sem_ch3.adb: Add with and use clause for Exp_Ch9. (Process_Full_View): Build wrapper specs for all primitives that belong to a private view completed by a concurrent type implementing an interface. * sem_ch6.adb (Analyze_Subprogram_Body): When the current subprogram is a primitive of a concurrent type with a private view that implements an interface, try to find the proper spec. (Analyze_Subprogram_Declaration): Mark a subprogram as a private primitive if the type of its first parameter is a non-generic tagged private type. (Analyze_Subprogram_Specification): Code reformatting. (Disambiguate_Spec): New routine. (Find_Corresponding_Spec): Add a flag to controll the output of errors. (Is_Private_Concurrent_Primitive): New routine. * sem_ch6.ads: (Find_Corresponding_Spec): Add a formal to control the output of errors. From-SVN: r138324
Diffstat (limited to 'gcc/ada/sem_ch6.ads')
-rw-r--r--gcc/ada/sem_ch6.ads8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch6.ads b/gcc/ada/sem_ch6.ads
index 689ac8b690a..e54c1e1117c 100644
--- a/gcc/ada/sem_ch6.ads
+++ b/gcc/ada/sem_ch6.ads
@@ -136,8 +136,8 @@ package Sem_Ch6 is
Get_Inst : Boolean := False) return Boolean;
-- Check that the types of two formal parameters are conforming. In most
-- cases this is just a name comparison, but within an instance it involves
- -- generic actual types, and in the presence of anonymous access types
- -- it must examine the designated types.
+ -- generic actual types, and in the presence of anonymous access types it
+ -- must examine the designated types.
procedure Create_Extra_Formals (E : Entity_Id);
-- For each parameter of a subprogram or entry that requires an additional
@@ -147,7 +147,9 @@ package Sem_Ch6 is
-- the end of Subp's parameter list (with each subsequent extra formal
-- being attached to the preceding extra formal).
- function Find_Corresponding_Spec (N : Node_Id) return Entity_Id;
+ function Find_Corresponding_Spec
+ (N : Node_Id;
+ Post_Error : Boolean := True) return Entity_Id;
-- Use the subprogram specification in the body to retrieve the previous
-- subprogram declaration, if any.