sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we generate the same errors compiling under -gnatc. 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. From-SVN: r118302
Name |
Last commit
|
Last update |
---|---|---|
INSTALL | Loading commit data... | |
boehm-gc | Loading commit data... | |
config | Loading commit data... | |
contrib | Loading commit data... | |
fixincludes | Loading commit data... | |
gcc | Loading commit data... | |
gnattools | Loading commit data... | |
include | Loading commit data... | |
intl | Loading commit data... | |
libada | Loading commit data... | |
libcpp | Loading commit data... | |
libdecnumber | Loading commit data... | |
libffi | Loading commit data... | |
libgfortran | Loading commit data... | |
libgomp | Loading commit data... | |
libiberty | Loading commit data... | |
libjava | Loading commit data... | |
libmudflap | Loading commit data... | |
libobjc | Loading commit data... | |
libssp | Loading commit data... | |
libstdc++-v3 | Loading commit data... | |
maintainer-scripts | Loading commit data... | |
zlib | Loading commit data... | |
ABOUT-NLS | Loading commit data... | |
COPYING | Loading commit data... | |
COPYING.LIB | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
MAINTAINERS | Loading commit data... | |
Makefile.def | Loading commit data... | |
Makefile.in | Loading commit data... | |
Makefile.tpl | Loading commit data... | |
README | Loading commit data... | |
README.SCO | Loading commit data... | |
compile | Loading commit data... | |
config-ml.in | Loading commit data... | |
config.guess | Loading commit data... | |
config.rpath | Loading commit data... | |
config.sub | Loading commit data... | |
configure | Loading commit data... | |
configure.in | Loading commit data... | |
depcomp | Loading commit data... | |
install-sh | Loading commit data... | |
libtool-ldflags | Loading commit data... | |
libtool.m4 | Loading commit data... | |
ltcf-c.sh | Loading commit data... | |
ltcf-cxx.sh | Loading commit data... | |
ltcf-gcj.sh | Loading commit data... | |
ltconfig | Loading commit data... | |
ltmain.sh | Loading commit data... | |
missing | Loading commit data... | |
mkdep | Loading commit data... | |
mkinstalldirs | Loading commit data... | |
move-if-change | Loading commit data... | |
symlink-tree | Loading commit data... | |
ylwrap | Loading commit data... |