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]

Re: [PATCH][RFC] Step 1 to a middle-end type-system


On 6/24/07, Richard Guenther <richard.guenther@gmail.com> wrote:
On 6/24/07, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> >   /* Return true if the conversion from INNER_TYPE to OUTER_TYPE is
> > !    explicitly, otherwise return false.
> > !    This function implicitly defines the middle-end type system.  The
> > !    following invariants shall be fulfilled:
> > !
> > !      1) type_conversion_needed_p is transitive.
> > !     If a < b and b < c then a < c.
>
> I don't think this is true, take a = c = int and b = char.  Which would
> suggest that the reverse form useless_type_conversion is probably easier
> to deal with, conceptually.

I don't understand. For a = c = int and b = char neither a < b nor b < c.

Oh, I see. The above was written at the time the predicate was named useless_type_conversion_p -- of course transitivity only olds for useless, not for needed. Hmm, so maybe a bad name after all.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]