Re: [PATCH] BIT_FIELD_REF_UNSIGNED considered harmful

2008-03-05 Thread Richard Kenner
> > >+if (INTEGRAL_TYPE_P (TREE_TYPE (t)) > > >+&& (TYPE_PRECISION (TREE_TYPE (t)) > > >+!= TREE_INT_CST_LOW (TREE_OPERAND (t, 1 > > >+ { > > >+error ("integral result type precision does not match " > > >+ "field size o

Re: [PATCH] BIT_FIELD_REF_UNSIGNED considered harmful

2008-03-05 Thread Manfred Hollstein
On Wed, 05 Mar 2008, 13:47:36 +0100, Diego Novillo wrote: > On 03/05/08 07:18, Richard Guenther wrote: > > >Comments? > > Makes sense to me. > > >+ if (INTEGRAL_TYPE_P (TREE_TYPE (t)) > >+ && (TYPE_PRECISION (TREE_TYPE (t)) > >+ != TREE_INT_CST_LOW (TREE_OP

Re: [PATCH] BIT_FIELD_REF_UNSIGNED considered harmful

2008-03-05 Thread Diego Novillo
On 03/05/08 07:18, Richard Guenther wrote: Comments? Makes sense to me. + if (INTEGRAL_TYPE_P (TREE_TYPE (t)) + && (TYPE_PRECISION (TREE_TYPE (t)) + != TREE_INT_CST_LOW (TREE_OPERAND (t, 1 + { + error ("integra

[PATCH] BIT_FIELD_REF_UNSIGNED considered harmful

2008-03-05 Thread Richard Guenther
While adding constant-folding for integral argument BIT_FIELD_REF I noticed we have no way of passing down BIT_FIELD_REF_UNSIGNED to fold_ternary. Luckily references to BIT_FIELD_REF_UNSIGNED are rare - only expansion cares for it, through the use of get_inner_reference. So I propose to tighthe