This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Tested on i686-linux, committed on HEAD The compiler was properly rejecting a qualified expression that applied a class-wide qualification to a specific type expression, but wasn't catching the opposite case. The condition was augmented to test for a class-wide operand, with an additional test of the original node, the latter check being needed to avoid rejecting cases of an expanded dispatching function call whose result appears to be class-wide. This patch is also a minor improvement of the error message given in case of conversion to an abstract interface type that is not implemented by a given type. Previous error message: (Ada 2005) does not implement interface "..." New error message: (Ada 2005) does not implement interface "..." defined at ... 2005-09-01 Javier Miranda <miranda@adacore.com> Ed Schonberg <schonberg@adacore.com> Gary Dismukes <dismukes@adacore.com> * sem_res.adb (Resolve_Membership_Op): In case of the membership test "Iface_CW_Typ in T'Class" we have nothing else to do in the frontend; the expander will generate the corresponding run-time check to evaluate the expression. (Resolve_Call): Check for legal type of procedure name or prefix that appears as a trigger in a triggering alternative. (Valid_Conversion): If expression is ambiguous and the context involves an extension of System, remove System.Address interpretations. (Resolve_Qualified_Expression): Reject the case of a specific-type qualification applied to a class-wide argument. Enhance comment to explain checking of Original_Node. (Resolve_Type_Conversion): The location of the error message was not general enough to handle the general case and hence it has been removed. In addition, this patch improves the text of the message. (Resolve_Type_Conversion): Add missing support for access to interface types. (Resolve_Type_Conversion): If the target is a class-wide interface type, do not expand if the expression is the actual in a call, because proper expansion will take place when the call itself is expanded. (Resolve_Allocator): If the context is an unchecked conversion, the allocator inherits its storage pool, if any, from the target type of the conversion.
Attachment:
difs.40
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |