[prev in list] [next in list] [prev in thread] [next in thread]
List: gmp-bugs
Subject: INT_MAX definition in gmp-impl.h conflicts with limits.h
From: vincent () vinc17 ! net (Vincent Lefevre)
Date: 2011-11-23 16:05:54
Message-ID: 20111123160554.GO3117 () xvii ! vinc17 ! org
[Download RAW message or body]
On 2011-11-23 15:35:33 +0100, Marc Glisse wrote:
> Ah. Maybe including limits.h in gmp-impl.h before defining INTMAX and such?
AFAIK, redefining standard macros when the corresponding header
(here <limits.h>) has been including is not allowed by the C standard.
So, problems might appear...
I think the real fix would be not to reuse the standard macro names.
For instance, GMP could define GMP_INTMAX and so on for its own use.
> It is already done for CRAY, I could make it be included also in C++/glibc
> when the #include <string> defined some macro characteristic of libc++.
>
> Actually, tests.h already includes config.h. If there is a dependency
> between tests.h and gmp-impl.h, we should probably include one in the other,
> but config.h is not such a dependency.
Ah, OK, I didn't see this.
--
Vincent Lef?vre <vincent at 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)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic