Fix build for old GMP version (#1114)
authorAndres Noetzli <andres.noetzli@gmail.com>
Tue, 26 Sep 2017 07:46:14 +0000 (00:46 -0700)
committerGitHub <noreply@github.com>
Tue, 26 Sep 2017 07:46:14 +0000 (00:46 -0700)
Older versions of GMP in combination with newer versions of GCC and
C++11 cause errors [0]. This commit adds the necessary includes of
<cstddef>.

[0] https://gcc.gnu.org/gcc-4.9/porting_to.html

src/util/gmp_util.h
src/util/rational_gmp_imp.h

index 2e1ccbc6a0ea4e9b04950264b299d078766d4c9f..2a15d7a7d40a7c4e338072d8f9f9702f3a214cdb 100644 (file)
 #ifndef __CVC4__GMP_UTIL_H
 #define __CVC4__GMP_UTIL_H
 
+/*
+ * Older versions of GMP in combination with newer versions of GCC and C++11
+ * cause errors: https://gcc.gnu.org/gcc-4.9/porting_to.html
+ * Including <cstddef> is a workaround for this issue.
+ */
+#include <cstddef>
+
 #include <gmpxx.h>
 
 namespace CVC4 {
index e0eba8ad9341193b0c4ae53ca566c1a9c4b4ad86..e731f3c2f3e6eb497c6a279797e9d3374d6caf33 100644 (file)
 #ifndef __CVC4__RATIONAL_H
 #define __CVC4__RATIONAL_H
 
+/*
+ * Older versions of GMP in combination with newer versions of GCC and C++11
+ * cause errors: https://gcc.gnu.org/gcc-4.9/porting_to.html
+ * Including <cstddef> is a workaround for this issue.
+ */
+#include <cstddef>
+
 #include <gmp.h>
 #include <string>