[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: |
Thu, 4 Jan 2001 01:44:10 +0100 |
User-agent: |
Mutt/1.2.5i |
On Thu, Jan 04, 2001 at 07:24:43 +1000, Kevin Ryde wrote:
> Vincent Lefevre <address@hidden> writes:
> >
> > #define SIGNED_TYPE_MIN(type) (((type) -1) << (8*sizeof(type)-1))
> >
> > and is not portable.
>
> Thanks, you're quite right, on Cray for instance.
and on Windows NT with some compiler (I know someone who uses a compiler
with 16-bit char's). IMHO, the best solution is to include <limits.h>
as told by the ISO C standard. If there are systems without <limits.h>,
I suppose this can be detected by configure and solutions similar to
the current one could be used on such systems.
--
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