[Gmp-commit] /var/hg/gmp: Disable __builtin_constant_p for g++34.

mercurial at gmplib.org mercurial at gmplib.org
Sat Jul 21 13:05:35 CEST 2012


details:   /var/hg/gmp/rev/f58b3cdf8c83
changeset: 15071:f58b3cdf8c83
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Sat Jul 21 13:04:35 2012 +0200
description:
Disable __builtin_constant_p for g++34.

diffstat:

 ChangeLog |  4 ++++
 gmpxx.h   |  4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r b5ca16212198 -r f58b3cdf8c83 ChangeLog
--- a/ChangeLog	Fri Jun 29 16:37:23 2012 +0200
+++ b/ChangeLog	Sat Jul 21 13:04:35 2012 +0200
@@ -1,3 +1,7 @@
+2012-07-21  Marc Glisse  <marc.glisse at inria.fr>
+
+	* gmpxx.h (__GMPXX_CONSTANT): Disable for g++-3.4.
+
 2012-06-26  Torbjorn Granlund  <tege at gmplib.org>
 
 	* Makefile.am (LIBMP_LT_*): Remove these.
diff -r b5ca16212198 -r f58b3cdf8c83 gmpxx.h
--- a/gmpxx.h	Fri Jun 29 16:37:23 2012 +0200
+++ b/gmpxx.h	Sat Jul 21 13:04:35 2012 +0200
@@ -32,7 +32,9 @@
 #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


More information about the gmp-commit mailing list