This is the mail archive of the gcc@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] Re-structure tree_ssa_useless_type_conversion_1 to work towards a middle-end type system


On 20 June 2007 15:25, Andrew Pinski wrote:

> On 6/20/07, Michael Matz <matz@suse.de> wrote:
>> Hi,
>> 
>> On Wed, 20 Jun 2007, Richard Guenther wrote:
>> 
>>>       /* If the outer type is (void *), then the conversion is not       
>>>          necessary. ???  This makes tree_ssa_useless_type_conversion_1 not
>>>          transitive.  */
>> 
>> Not this line itself makes it not transitive, but the fact that it still
>> relies on the frontends langhooks makes it so.  Document that fact so it's
>> clear that when the final goal is implemented (langhook removed) this
>> doesn't violate transitivity.
> 
> Huh?  Yes it does violate transivity.  int *a; void *b;
> "b = a;" vs "a = (int*)b;"  (this is IR form I am talking about).
> 
> -- Pinski


  That's commutativity.  Transitivity would mean that if you can assign a to b without a conversion, and you can assign b to c without a conversion, then you can assign a to c without a conversion.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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