2006-10-31 Ed Schonberg <schonberg@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Oct 2006 18:07:52 +0000 (18:07 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Oct 2006 18:07:52 +0000 (18:07 +0000)
commitdf1cd748aaa42106ce7a5af6b426d8e7ccc395ba
treebe108e443bbb52fd089a4cba0257c1efb3491355
parent152e2eefaa785ed90316fe078e1f722a3490a24c
2006-10-31  Ed Schonberg  <schonberg@adacore.com>
    Hristian Kirtchev  <kirtchev@adacore.com>
    Bob Duff  <duff@adacore.com>

* sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Declaration): A null
procedure cannot be a protected operation (it is a basic_declaration,
not a subprogram_declaration).
(Check_Overriding_Indicator): Rename formal Does_Override to Overridden_
Subp. Add logic for entry processing.
(Check_Synchronized_Overriding): New procedure in New_Overloaded_Entity.
Determine whether an entry or subprogram of a protected or task type
override an inherited primitive of an implemented interface.
(New_Overloaded_Entity): Add calls to Check_Synchronized_Overriding.
Update the actual used in calls to Check_Overriding_Indicator.
(Analyze_Generic_Subprogram_Body): If the subprogram is a child unit,
generate the proper reference to the parent unit, for cross-reference.
(Analyze_Subprogram_Declaration): Protect Is_Controlling_Formal with
Is_Formal.
Add -gnatd.l --Use Ada 95 semantics for limited function returns,
(Add_Extra_Formal): Revise procedure to allow passing in associated
entity, scope, and name suffix, and handle setting of the new
Extra_Formals field.
(Create_Extra_Formals): Change existing calls to Add_Extra_Formal to
pass new parameters. Add support for adding the new extra access formal
for functions whose calls are treated as build-in-place.
(Analyze_A_Return_Statement): Correct casing in error message.
Move Pop_Scope to after Analyze_Function_Return, because an extended
return statement really is a full-fledged scope. Otherwise, visibility
doesn't work right. Correct use of "\" for continuation messages.
(Analyze_Function_Return): Call Analyze on the Obj_Decl, rather than
evilly trying to call Analyze_Object_Declaration directly. Otherwise,
the node doesn't get properly marked as analyzed.
(Analyze_Subprogram_Body): If subprogram is a function that returns
an anonymous access type that denotes a task, build a Master Entity
for it.
(Analyze_Return_Type): Add call to Null_Exclusion_Static_Checks. Verify
proper usage of null exclusion in a result definition.
(Process_Formals): Code cleanup and new error message.
(Process_Formals): Detect incorrect application of null exclusion to
non-access types.
(Conforming_Types): Handle conformance between [sub]types and itypes
 generated for entities that have null exclusions applied to them.
(Maybe_Primitive_Operation): Add an additional type retrieval when the
 base type is an access subtype. This case arrises with null exclusions.
(New_Overloaded_Entity): Do not remove the overriden entity from the
homonym chain if it corresponds with an abstract interface primitive.
(Process_Formals): Replace membership test agains Incomplete_Kind with a
call to the synthesized predicate Is_Incomplete_Type.
(Analyze_Subprogram_Body): Check wrong placement of abstract interface
primitives.
(Analyze_Subprogram_Declaration): Check that abstract interface
primitives are abstract or null.
(Analyze_Subprogram_Specification): Remove previous check for abstract
interfaces because it was not complete.
(Has_Interface_Formals): Removed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118304 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch6.ads