comp.lang.ada
 help / color / mirror / Atom feed
From: Barry and Jackie Schiff <schiff@netspace.net.au>
Subject: A question for compiler vendors/lang experts. redefinition of "="
Date: 1997/12/16
Date: 1997-12-16T00:00:00+00:00	[thread overview]
Message-ID: <34964C63.F97005E6@netspace.net.au> (raw)


Got one answer from a large compiler vendor when another vendor's
implementation implies otherwise. Looked in the Rationale and LRM and it
was hard to find a clear answer. So here is the question for all those
language experts out there:


package Foo is

    type objects is abstract tagged record
        Some_value : some_type;
    end record;

    type class_wide_pointers is access all objects'class;

    function "="(left, right : access objects) return boolean; --
Legal??

end Foo;


The question: Is the redefinition of "=" shown above legal and if so
what are the semantics.  Specifically, is "=" a dispatching primitive
operation or is it ambiguous with the predefined equality defined for
the class_wide_pointers type.

--------------
In my reading the LRM it seems to me that the spirit of access
parameters is that the above operation is a dispatching operation. I
have had a large Ada compiler vendor tell me that the above is
ambiguous. While another compiler implements that above as a dispatching
operation. Can anyone point me to the definitive answer in the LRM.


Thanks in advance. If it is not to much trouble could you email answer.


--Barry Schiff





             reply	other threads:[~1997-12-16  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-16  0:00 Barry and Jackie Schiff [this message]
1997-12-16  0:00 ` A question for compiler vendors/lang experts. redefinition of "=" Tucker Taft
1997-12-16  0:00 ` David  Weller
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox