[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#582698: libc6-dev: INTMAX_MAX definition yields build failure in 32-bit C90 mode though intmax_t is supported



On 2010-05-22 21:36:14 +0000, Clint Adams wrote:
> Is this patch what you want?

No, that would be incorrect, as when __WORDSIZE isn't 64,
/usr/include/stdint.h defines:

__extension__
typedef long long int           intmax_t;
__extension__
typedef unsigned long long int  uintmax_t;

i.e. intmax_t and uintmax_t are still 64 bits.

INTMAX_MAX and so on should match the intmax_t and uintmax_t
definitions.

BTW, notice that the fact that intmax_t and uintmax_t are 64 bits
is against the principle that unsigned long is the largest integer
type in C90. So, perhaps this shouldn't be hidden by __extension__
above (this would solve the problem in another way).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



Reply to: