bug#12350: Composites identified as primes in factor.c (when HAVE_GMP)
From:
Paul Eggert
Subject:
bug#12350: Composites identified as primes in factor.c (when HAVE_GMP)
Date:
Thu, 06 Sep 2012 17:22:22 -0700
User-agent:
Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0
On 09/06/2012 02:33 PM, Jim Meyering wrote:
>> > * We have some hardwired W_TYPE_SIZE settings for the code interfacing
>> > to longlong.h. It is now 64 bits. It will break on systems where
>> > uintmax_t is not a 64-bit type. Please see the beginning of
>> > factor.c.
> I wonder how many types of systems would be affected.
It's only a matter of time. GCC already supports 128-bit
integers on my everyday host (Fedora 17, x86-64, GCC 4.7.1).
Eventually uintmax_t will grow past 64 bits, if only for the
crypto guys.
If the code needs exactly-64-bit unsigned integers, shouldn't
it be using uint64_t? That's the standard way of doing
that sort of thing. Gnulib can supply the type on pre-C99
platforms. Weird but standard-conforming platforms that
don't have uint64_t will be out of luck, but surely they're out
of luck anyway.