------- Comment #4 from adam at irvine dot com 2010-01-08 00:46 ------- (In reply to comment #2) > From what I understand: > - "access T1" is an access_definition and thus a general access type (RM > 3.10(12/2)) > - "Y'Access" is of the type of its context, which should be a general access > type (RM 3.10.2(24/1)) > - An equality operator exists for anonymous access types and is visible > because it is defined in Standard (RM 4.5.2(7.2/2)) > Note that the current GCC gives no error even on the line you marked with > "error detected". > Do you agree that this bug can be closed?
I know this is rather delayed but my attention just got drawn to this bug report. In any case, Samuel is wrong. There is no equality operator on anonymous access types. RM 4.5.2(7.2/2) says there is an "=" operator on universal_access, *for* *use* *with* anonymous access types; but the parameters of the "=" subprogram have type universal_access, and an 'Access cannot be used when the expected type is universal_access. See AC-00164. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16095