This is the mail archive of the
mailing list for the GCC project.
Re: [ping] Re: c_common_type_for_mode: pass precision, not mode
- From: Jeffrey A Law <law at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Jan 2005 11:10:08 -0700
- Subject: Re: [ping] Re: c_common_type_for_mode: pass precision, not mode
- Organization: Red Hat, Inc
- References: <200412160346.iBG3kv9q011598@greed.delorie.com> <200501080334.j083YNjO011659@greed.delorie.com>
- Reply-to: law at redhat dot com
On Fri, 2005-01-07 at 22:34 -0500, DJ Delorie wrote:
> > X-Sieve: CMU Sieve 2.2
> > Mailing-List: contact email@example.com; run by ezmlm
> > Sender: firstname.lastname@example.org
> > Date: Wed, 15 Dec 2004 22:46:58 -0500
> > From: DJ Delorie <email@example.com>
> > X-RedHat-Spam-Score: 0
> > I found this with an internal port, so if someone suggests a port with
> > a pointer mode that doesn't match any "normal" integer type modes I
> > can test it officially.
The last one I was aware of was the mn102, which we deprecated a while
back. It had 24bit pointers.
> > I'm also unsure whether the mode's bitsize or precision is the
> > appropriate value to pass. Consider, for example, using a fractional
> > int mode for Pmode.
Based on the comments, I would think precision.
> > 2004-12-15 DJ Delorie <firstname.lastname@example.org>
> > * c-common.c (c_common_type_for_mode): Pass the mode's precision
> > to make_[un]signed_type, not the mode itself.
Presumably this bootstrapped and comparison tested? If so, then it's
fine (the code in mainline right now is clearly incorrect).
Do you have a testcase? Even if it only triggers on the internal port
it would be good to get the test added to the testsuite.