This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r118302 - /trunk/gcc/ada/sem_ch4.adb
- From: charlet at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Tue, 31 Oct 2006 18:07:14 -0000
- Subject: r118302 - /trunk/gcc/ada/sem_ch4.adb
Author: charlet
Date: Tue Oct 31 18:07:13 2006
New Revision: 118302
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118302
Log:
2006-10-31 Ed Schonberg <schonberg@adacore.com>
Javier Miranda <miranda@adacore.com>
Robert Dewar <dewar@adacore.com>
* sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we
generate the same errors compiling under -gnatc.
(Try_Object_Operation): If no candidate interpretation succeeds, but
there is at least one primitive operation with the right name, report
error in call rather than on a malformed selected component.
(Analyze_Selected_Component): If the prefix is an incomplete type from
a limited view, and the full view is available, use the full view to
determine whether this is a prefixed call to a primitive operation.
(Operator_Check): Verify that a candidate interpretation is a binary
operation before checking the type of its second formal.
(Analyze_Call): Add additional warnings for function call contexts not
yet supported.
(Analyze_Allocator): Move the check for "initialization not allowed for
limited types" after analyzing the expression. This is necessary,
because OK_For_Limited_Init looks at the structure of the expression.
Before analysis, we don't necessarily know what sort of expression it
is. For example, we don't know whether F(X) is a function call or an
indexed component; the former is legal in Ada 2005; the latter is not.
(Analyze_Allocator): Correct code for AI-287 -- extension aggregates
were missing. We also didn't handle qualified expressions. Now also
allow function calls. Use new common routine OK_For_Limited_Init.
(Analyze_Type_Conversion): Do not perform some legality checks in an
instance, because the error message will be redundant or spurious.
(Analyze_Overloaded_Selected_Component): Do not do style check when
setting an entity, since we do not know it is the right entity yet.
(Analyze_Selected_Component): Move Generate_Reference call to Sem_Res
(Analyze_Overloaded_Selected_Component): Same change
(Analyze_Selected_Component): Remove unnecessary prefix type retrieval
since regular incomplete subtypes are transformed into corresponding
subtypes of their full views.
(Complete_Object_Operation): Treat name of transformed subprogram call
as coming from source, for browsing purposes.
(Try_Primitive_Operation): If formal is an access parameter, compare
with base type of object to determine whether it is a primitive
operation.
(Operator_Check): If no interpretation of the operator matches, check
whether a use clause on any candidate might make the operation legal.
(Try_Class_Wide_Operation): Check whether the first parameter is an
access type whose designated type is class-wide.
Modified:
trunk/gcc/ada/sem_ch4.adb