This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: autoconf for type sizes
- To: rth at redhat dot com
- Subject: Re: autoconf for type sizes
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 12 Mar 2001 22:41:01 -0500 (EST)
- Cc: gcc-patches at gcc dot gnu dot org, zackw at Stanford dot EDU
> From: Richard Henderson <rth@redhat.com>
>
> On Mon, Mar 12, 2001 at 03:38:17PM -0500, Kaveh R. Ghazi wrote:
> > 2. (Optional) while you're at it, why not use WORD_BIT/LONG_BIT (with
> > defaults of 32 for both) and skip the sizeof test for int/long.
>
> Why, when you are guaranteed that CHAR_BIT*sizeof(type) works?
> r~
Because IMHO, the compile-time sizeof check is a gross hack and I wish
to reduce our reliance on it. (BTW, I originally wrote it.)
I'm especially concerned because it may not work on some non-gcc
compilers. We just don't know and while the unreleased upcoming
autoconf uses similar hacks, it hasn't been widely tested on non-gcc
compilers AFAIK.
Zack's floating stuff falls into a similar category, except it relies
too heavily on dark corners and edge cass of float rounding.
My instincts say we're going to get bit by either one or both. But I
guess only time will tell...
--Kaveh
PS: I don't mean to be a wet blanket Zack, I think you're doing great
stuff and I generally support the goal and appreciate the work you've
done cleaning out all the cruft in those files.
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions