[stp] Rearrange declaration ordering to match GCC 4.7 C++ rules.

Jerry James jjames at fedoraproject.org
Tue Jan 10 23:38:52 UTC 2012


commit 4c15fd5062bd3c5f5ec576dbbbf0526deaaa63a0
Author: Jerry James <loganjerry at gmail.com>
Date:   Tue Jan 10 16:38:29 2012 -0700

    Rearrange declaration ordering to match GCC 4.7 C++ rules.

 stp-gcc47.patch |   25 +++++++++++++++++++++++++
 stp.spec        |    4 ++++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/stp-gcc47.patch b/stp-gcc47.patch
new file mode 100644
index 0000000..f522a00
--- /dev/null
+++ b/stp-gcc47.patch
@@ -0,0 +1,25 @@
+--- ./src/sat/mtl/Map.h.orig	2010-11-27 19:45:43.000000000 -0700
++++ ./src/sat/mtl/Map.h	2012-01-10 16:30:55.918767977 -0700
+@@ -29,17 +29,17 @@ namespace Minisat {
+ // Default hash/equals functions
+ //
+ 
++static inline uint32_t hash(uint32_t x){ return x; }
++static inline uint32_t hash(uint64_t x){ return (uint32_t)x; }
++static inline uint32_t hash(int32_t x) { return (uint32_t)x; }
++static inline uint32_t hash(int64_t x) { return (uint32_t)x; }
++
+ template<class K> struct Hash  { uint32_t operator()(const K& k)               const { return hash(k);  } };
+ template<class K> struct Equal { bool     operator()(const K& k1, const K& k2) const { return k1 == k2; } };
+ 
+ template<class K> struct DeepHash  { uint32_t operator()(const K* k)               const { return hash(*k);  } };
+ template<class K> struct DeepEqual { bool     operator()(const K* k1, const K* k2) const { return *k1 == *k2; } };
+ 
+-static inline uint32_t hash(uint32_t x){ return x; }
+-static inline uint32_t hash(uint64_t x){ return (uint32_t)x; }
+-static inline uint32_t hash(int32_t x) { return (uint32_t)x; }
+-static inline uint32_t hash(int64_t x) { return (uint32_t)x; }
+-
+ 
+ //=================================================================================================
+ // Some primes
diff --git a/stp.spec b/stp.spec
index 5fed360..32fce1f 100644
--- a/stp.spec
+++ b/stp.spec
@@ -22,6 +22,9 @@ Source0:	stp-%{version}.tar.xz
 # This patch has not yet been sent upstream.  Fix a bunch of compiler warnings
 # that may indicate miscompiled code.
 Patch0:		stp-warning.patch
+# This patch has not yet been sent upstream.  Deal with new C++ declaration
+# ordering rules in GCC 4.7.
+Patch1:		stp-gcc47.patch
 
 BuildRequires:	bison
 BuildRequires:	boost-devel
@@ -72,6 +75,7 @@ or automated prover).  Provides a static library.
 %prep
 %setup -q
 %patch0
+%patch1
 
 # Make sure nothing uses the shipped boost sources
 rm -fr src/boost


More information about the scm-commits mailing list