bug-gmp
[Top][All Lists]
Advanced

[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 01:09:45 +0100
User-agent: Pluto/2.02b (RISC-OS/4.02) POPstar/2.02

On 14 Dec, Kevin Ryde <address@hidden> wrote:

> The suggestion would be to include limits.h before including
> gmp-impl.h.  You can see gmp-impl.h has suitable #ifndef's.  I guess I
> generally believe in standard headers before application ones.

The problem is that one can have

#include <gmp-impl.h>
#include <some_header.h>

where both gmp-impl.h and some_header.h are application headers, and
where some_header.h includes <limits.h>. A particular order between
application headers should not be required.

> > To avoid such errors, gmp-impl.h should include <limits.h> at the
> > beginning.

> Not sure about the merits of nested includes.

This is done anywhere, in application headers, and even in standard
headers (in practice).

> In any case this is gmp internals, and while it's not meant to be
> deliberately difficult, it's not a published interface.

Anyway, this header is necessary for MPFR.

-- 
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]