This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: {tree-ssa] Fixes re multiple type nodes from IMA
dalej@apple.com (Dale Johannesen) wrote on 11.03.04 in <5DFE3826-73B3-11D8-8D44-000A95D7CD40@apple.com>:
> On Mar 11, 2004, at 2:47 PM, Richard Henderson wrote:
> > On Wed, Mar 10, 2004 at 05:49:50PM -0800, Dale Johannesen wrote:
> >> + /* This compares two types for equivalence ("compatible" in C-based
> >> languages).
> >> + This routine should only return 1 if it is sure. It should not
> >> be used
> >> + in contexts where erroneously returning 0 causes problems. */
> >> +
> >> + int
> >> + lhd_types_eq_p (tree x, tree y)
> >> + {
> >> + return x == y;
> >> + }
> >
> > I'd prefer "compatible" in the function name as well for emphasis.
>
> I have no problem with this, but does that concept exist in non-C based
> languages?
Sure. ISO Pascal, for example, has same type, compatible type, and
assignment-compatible type. (And I believe the first two are equivalence
relations, whereas the third is a partial ordering.)
MfG Kai