broken arithmetic operations on vectors (c and c++)

Mark Mitchell mark@codesourcery.com
Mon Jun 13 15:29:00 GMT 2005


Jason Merrill wrote:
> On Mon, 13 Jun 2005 09:25:14 -0400, Aldy Hernandez <aldyh@redhat.com> wrote:
> 
> 
>>In keeping with the C front end, I think we should allow arithmetic
>>between same type vectors with different signs.  I tried to use comptypes,
>>and a few other functions to no avail.  The easiest thing I could think
>>of was using the mode.  Is this correct?
> 
> 
> It seems like a bit of a kludge, but probably fine.

I don't think this is correct.

I think we should be checking that we need a predicate for 
same_type_ignoring_signedness.  That's not hard to implement.

Any time we're looking at TYPE_MODE in a front end, we're being lazy, at 
best.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gcc-patches mailing list