summaryrefslogtreecommitdiff
path: root/gmpxx.h
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2012-07-21 13:04:35 +0200
committerMarc Glisse <marc.glisse@inria.fr>2012-07-21 13:04:35 +0200
commit1859e37fd53a9e3f55d26579a9a18b7f4d7d8ed8 (patch)
treebec5db9add5ff42b1918884cdc0e838158998441 /gmpxx.h
parent3faf69d9051b47f9096b55a5199ec12c71a00ee1 (diff)
downloadgmp-1859e37fd53a9e3f55d26579a9a18b7f4d7d8ed8.tar.gz
Disable __builtin_constant_p for g++34.
Diffstat (limited to 'gmpxx.h')
-rw-r--r--gmpxx.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gmpxx.h b/gmpxx.h
index 4f0171044..97c5e1907 100644
--- a/gmpxx.h
+++ b/gmpxx.h
@@ -32,7 +32,9 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
#include <gmp.h>
// wrapper for gcc's __builtin_constant_p
-#if defined (__GNUC__) && __GNUC__ >= 2
+// __builtin_constant_p has been in gcc since forever,
+// but g++-3.4 miscompiles it.
+#if __GMP_GNUC_PREREQ(4, 2)
#define __GMPXX_CONSTANT(X) __builtin_constant_p(X)
#else
#define __GMPXX_CONSTANT(X) false