This is the mail archive of the
mailing list for the GCC project.
Re: three problems with stor-layout.c.
- From: Richard Biener <rguenther at suse dot de>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org, Richard Sandiford <rdsandiford at googlemail dot com>, Mike Stump <mikestump at comcast dot net>
- Date: Fri, 22 Nov 2013 09:58:44 +0100 (CET)
- Subject: Re: three problems with stor-layout.c.
- Authentication-results: sourceware.org; auth=none
- References: <528CF1F4 dot 1000906 at naturalbridge dot com> <alpine dot LNX dot 2 dot 00 dot 1311211510060 dot 8615 at zhemvz dot fhfr dot qr> <1653644 dot knaADCop9e at polaris> <528EC052 dot 7050604 at naturalbridge dot com>
On Thu, 21 Nov 2013, Kenneth Zadeck wrote:
> Here is the patch. As you can see, i chose the unsigned option.
> It was bootstrapped and tested on x86 with all languages including ada.
> Ok to commit?
> 2013-11-21 firstname.lastname@example.org
> * store-layout.c
> (place-field): Fix hwi test and accessor mismatch.
> On 11/21/2013 11:07 AM, Eric Botcazou wrote:
> > > 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(?)).
> > And please make sure to test Ada if you're tweaking this, it's fragile
> > stuff.