[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gmp 3.1.1] LONG_MAX and ULONG_MAX redefined
From: |
Vincent Lefevre |
Subject: |
Re: [gmp 3.1.1] LONG_MAX and ULONG_MAX redefined |
Date: |
Fri, 15 Dec 2000 11:29:35 +0100 |
User-agent: |
Mutt/1.2.5i |
On Fri, Dec 15, 2000 at 05:31:50 +0100, Torbjorn Granlund wrote:
> No, no, no. gmp-impl.h is *not* an application header.
> It is a GMP-internal header. We do anything there that is useful
> for the GMP implementation.
Anyway, not using <limits.h> to get ULONG_MAX, LONG_MAX, etc. (i.e. the
way specified by the C standard) is *very* bad programming. For instance,
your code use the fact that bytes have 8 bits:
#define SIGNED_TYPE_MIN(type) (((type) -1) << (8*sizeof(type)-1))
and is not portable.
--
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA