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 trunk In Ada 2005, a user-defined abstract operation is not a candidate interpretation for an overloaded subprogram name. This complicates the analysis of expressions whose operands are literals, when one of the arithmetic operators has been declared abstract on some numeric type, because the universal interpretation of the expression may still be available. The expression may appear ambiguous during the second pass of type resolution because of the spurious presence of the universal interpretation, but this interpretation cannot be removed during the first pass, because the context type is not yet known, and may itself be universal. As a result, when disambiguating an operation that has a universal interpretation and whose context is not universal, we must examine whether it, or some subexpression of it, has an abstract interpretation, in which case the ambiguity is resolved in favor of the non-universal one. gnat.dg/test_rational_arithmetic.adb must compile quietly. 2007-04-06 Ed Schonberg <schonberg@adacore.com> Javier Miranda <miranda@adacore.com> * sem_type.ads, sem_type.adb (Has_Abstract_Interpretation): Make predicate recursive, to handle complex expressions on literals whose spurious ambiguity comes from the abstract interpretation of some subexpression. (Interface_Present_In_Ancestor): Add support to concurrent record types. (Add_One_Interp,Disambiguate): Split Is_Abstract flag into Is_Abstract_Subprogram and Is_Abstract_Type.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |