This is the mail archive of the 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: three problems with stor-layout.c.

On Wed, 20 Nov 2013, Kenneth Zadeck wrote:

> Richi,
> We noticed three problems with the place_field on the wide-int branch.    They
> come from problems on the trunk.   So i assume you want me to fix the trunk
> and push back into the branch.   The question is how do you want them fixed?
> 1) at line 1198, rli->offset is tested as an unsigned int and used as a signed
> int on line 1203.
> 2) The same mistake is made on lines 1241 and 1247.
> 3) at line 1303, TYPE_SIZE (type) is tested as a signed int and used as an
> unsigned int on line 1313.
> They can be fixed by you saying if they are really signed or unsigned or we
> can just convert them to double-int and push the change as addr wide-ints to
> the branch.

I think most of these are because in the past (yes I have fixed that!!)
all 'sizetype' constants were sign-extended (and the signedness,
that is, TYPE_UNSIGNED (sizetype), was frontend dependend (ugh) and
then later true, thus unsigned).

So I think all _SIZE stuff should check fits_uhwi_p and be used as
uhwi.  But that may have ripple-down effects, so consistently
using fits_shwi_p and using as shwi is also fine (it just restricts
the maximum values we accept(?)).


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