sem_cat.adb (Validate_RCI_Subprogram_Declaration): Add tests of Has_Stream_Attribute_ Definition when...
2008-04-08 Gary Dismukes <dismukes@adacore.com>
Ed Schonberg <schonberg@adacore.com>
Robert Dewar <dewar@adacore.com>
* sem_cat.adb (Validate_RCI_Subprogram_Declaration): Add tests of
Has_Stream_Attribute_ Definition when checking for available stream
attributes on parameters of a limited type in Ada 2005. Necessary for
proper recognition of visible stream attribute clauses.
(Has_Stream_Attribute_Definition): If the type is derived from a
private type, then use the derived type's underlying type for checking
whether it has stream attributes.
(Validate_Object_Declaration): The check for a user-defined Initialize
procedure applies also to types with controlled components or a
controlled ancestor.
Reject an object declaration in a preelaborated unit if the type is a
controlled type with an overriding Initialize procedure.
(Validate_Remote_Access_To_Class_Wide_Type): Return without further
checking when the parent of a dereference is a selected component and
the name has not been analyzed.
* sem_ch4.adb (Analyze_Selected_Component): Add checking for selected
prefixes that are invalid explicit dereferences of remote
access-to-class-wide values, first checking whether the selected
component is a prefixed form of call to a tagged operation.
(Analyze_Call): Remove code that issues an error for limited function
calls in illegal contexts, as we now support all of the contexts that
were forbidden here.
Allow a function call that returns a task.and appears as the
prefix of a selected component.
(Analyze_Reference): Give error message if we try to make a 'Reference
for an object that is atomic/aliased without its type having the
corresponding attribute.
(Analyze_Call): Remove condition checking for attributes to allow
calls to functions with inherently limited results as prefixes of
attributes. Remove related comment about Class attributes.
(Analyze_Selected_Component): If the prefix is a remote type, check
whether this is a prefixed call before reporting an error.
(Complete_Object_Operation): If the controlling formal is an access to
variable reject an actual that is a constant or an access to one.
(Try_Object_Operation): If prefix is a tagged protected object,retrieve
primitive operations from base type.
* exp_ch4.adb (Expand_N_Indexed_Component): Test for prefix that is a
build-in-place
function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
(Expand_N_Selected_Component): Test for prefix that is a build-in-place
function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
(Expand_N_Slice): Test for prefix that is a build-in-place function call
and call Make_Build_In_Place_Call_In_Anonymous_Context.
(Analyze_Call): Remove code that issues an error for limited function
calls in illegal contexts, as we now support all of the contexts that
were forbidden here.
New calling sequence for Get_Simple_Init_Val
(Expand_Boolean_Operator): Add call to Silly_Boolean_Array_Xor_Test
(Expand_N_Op_Not): Add call to Silly_Boolan_Array_Not_Test
From-SVN: r134026