Bruno Haible <[EMAIL PROTECTED]> writes:
> No, it appears correct as it is. For example, if bits==32, it will be
>((1U << 31) - 1) * 2 + 1)
> = (0x7fffU * 2 + 1)
> = 0xU
You're right, of course. That's what I get for writing without testing.
Sorry about the noise.
Paul Eggert wrote:
> > : zero) + 1) << ((bits) ? (bits) - 1 : 0)) - 1) * 2 + 1)
>
> Hmm, that's not quite right either, surely you meant (bits) - 2.
No, it appears correct as it is. For example, if bits==32, it will be
((1U << 31) - 1) * 2 + 1)
= (0x7fffU * 2 + 1)
=
Bruno Haible <[EMAIL PROTECTED]> writes:
>> #if @HAVE_STDINT_H@
>> # if defined __sgi && ! defined __c99 && __STDC_VERSION__ < 199901L
>
> Where does the __STDC_VERSION__ test come from?
I wanted to handle the future case when SGI fixes the bug in their
system. But you're right, this won't work
Hi Paul,
> Here's a proposed rewrite of the stdint module that attempts to
> simplify the module
Great job! Overall, I like it.
> The basic idea is to use macros instead of typedefs.
That simplifies some of the #ifs; the other part is done by assuming
current hardware with 16 or 32 or 64-bit re