sem_attr.ads, [...] (Analyze_Access_Attribute): Diagnose properly an attempt to apply...
authorEd Schonberg <schonberg@adacore.com>
Tue, 31 Oct 2006 18:06:06 +0000 (19:06 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 31 Oct 2006 18:06:06 +0000 (19:06 +0100)
commit468c6c8af61691d22e832fbd9f6a3d840d00171d
treee430fef9f70b2c6e9a023185a5207237d0af6a58
parentdaca8389efba4b72ee492746f613faa05413dff0
sem_attr.ads, [...] (Analyze_Access_Attribute): Diagnose properly an attempt to apply Unchecked_Access to a protected operation.

2006-10-31  Ed Schonberg  <schonberg@adacore.com>
    Thomas Quinot  <quinot@adacore.com>
    Javier Miranda  <miranda@adacore.com>
    Gary Dismukes  <dismukes@adacore.com>

* sem_attr.ads, sem_attr.adb (Analyze_Access_Attribute): Diagnose
properly an attempt to apply Unchecked_Access to a protected operation.
(OK_Self_Reference): New subprogram to check the legality of an access
attribute whose prefix is the type of an enclosing aggregate.
Generalizes previous mechanism to handle attribute references nested
arbitrarily deep within the aggregate.
(Analyze_Access_Attribute): An access attribute whose prefix is a type
can appear in an aggregate if this is a default-initialized aggregate
for a self-referential type.
(Resolve_Attribute, case Access): Ditto.
Add support for new implementation defined attribute Stub_Type.
(Eval_Attribute, case Attribute_Stub_Type): New case.
(Analyze_Attribute, case Attribute_Stub_Type): New case.
(Stream_Attribute_Available): Implement using new subprogram from
sem_cat, Has_Stream_Attribute_Definition, instead of incorrect
Has_Specified_Stream_Attribute flag.
Disallow Storage_Size and Storage_Pool for access to subprogram
(Resolve_Attribute, case 'Access et al): Take into account anonymous
access types of return subtypes in extended return statements. Remove
accessibility checks on anonymous access types when Unchecked_Access is
used.
(Analyze_Attribute): Add support for the use of 'Class to convert
a class-wide interface to a tagged type.
Add support for the attribute Priority.
(Resolve_Attribute, case Attribute_Access): For Ada_05, add test for
whether the designated type is discriminated with a constrained partial
view and require static matching in that case.
Add local variable Des_Btyp. The Designated_Type
of an access to incomplete subtype is either its non-limited view if
coming from a limited with or its etype if regular incomplete subtype.

* sem_cat.ads, sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type):
Fix predicate to identify and allow cases of (expander-generated)
references to tag of designated object of a RACW.
(Validate_Static_Object_Name): In Ada 2005, a formal object is
non-static, and therefore cannot appear as a primary in a preelaborable
package.
(Has_Stream_Attribute_Definition): New subprogram, abstracted from
Has_Read_Write_Attributes.
(Has_Read_Write_Attributes): Reimplement in termes of
Has_Stream_Attribute_Definition.
(Missing_Read_Write_Attributes): When checking component types in a
record, unconditionally call Missing_Read_Write_Attributes recursively
(remove guard checking for Is_Record_Type / Is_Access_Type).

From-SVN: r118298
gcc/ada/sem_attr.adb
gcc/ada/sem_attr.ads
gcc/ada/sem_cat.adb
gcc/ada/sem_cat.ads