cvc3-2.4.1-gccv6-fix.patch 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. commit 4eb28b907e89be05d92eb704115f821b9b848e60
  2. Author: Matthew Dawson <matthew@mjdsystems.ca>
  3. Date: Sun Oct 16 22:06:03 2016 -0400
  4. Fix gcc v6 compile failures.
  5. * Use std::hash<const char*> over std::hash<char *>, as throwing away the const is not allowed.
  6. * Use Hash::hash by default in CDMap over std::hash, to get Hash::hash<CVC3::expr>
  7. diff --git a/src/expr/expr_value.cpp b/src/expr/expr_value.cpp
  8. index 0c85ff6..e4dd251 100644
  9. --- a/src/expr/expr_value.cpp
  10. +++ b/src/expr/expr_value.cpp
  11. @@ -29,7 +29,7 @@ namespace CVC3 {
  12. // Class ExprValue static members
  13. ////////////////////////////////////////////////////////////////////////
  14. -std::hash<char*> ExprValue::s_charHash;
  15. +std::hash<const char*> ExprValue::s_charHash;
  16. std::hash<long int> ExprValue::s_intHash;
  17. ////////////////////////////////////////////////////////////////////////
  18. diff --git a/src/include/cdmap.h b/src/include/cdmap.h
  19. index faf682a..c3b094c 100644
  20. --- a/src/include/cdmap.h
  21. +++ b/src/include/cdmap.h
  22. @@ -43,9 +43,9 @@ namespace CVC3 {
  23. // Auxiliary class: almost the same as CDO (see cdo.h), but on
  24. // setNull() call it erases itself from the map.
  25. -template <class Key, class Data, class HashFcn = std::hash<Key> > class CDMap;
  26. +template <class Key, class Data, class HashFcn = Hash::hash<Key> > class CDMap;
  27. -template <class Key, class Data, class HashFcn = std::hash<Key> >
  28. +template <class Key, class Data, class HashFcn = Hash::hash<Key> >
  29. class CDOmap :public ContextObj {
  30. Key d_key;
  31. Data d_data;
  32. diff --git a/src/include/expr_hash.h b/src/include/expr_hash.h
  33. index b2107d7..baa2eab 100644
  34. --- a/src/include/expr_hash.h
  35. +++ b/src/include/expr_hash.h
  36. @@ -20,7 +20,6 @@
  37. * hash_set over Expr class.
  38. */
  39. /*****************************************************************************/
  40. -
  41. #ifndef _cvc3__expr_h_
  42. #include "expr.h"
  43. #endif
  44. diff --git a/src/include/expr_value.h b/src/include/expr_value.h
  45. index 95102b2..f53aa4d 100644
  46. --- a/src/include/expr_value.h
  47. +++ b/src/include/expr_value.h
  48. @@ -179,7 +179,7 @@ protected:
  49. // Static hash functions. They don't depend on the context
  50. // (ExprManager and such), so it is still thread-safe to have them
  51. // static.
  52. - static std::hash<char*> s_charHash;
  53. + static std::hash<const char*> s_charHash;
  54. static std::hash<long int> s_intHash;
  55. static size_t pointerHash(void* p) { return s_intHash((long int)p); }
  56. diff --git a/src/theory_core/theory_core.cpp b/src/theory_core/theory_core.cpp
  57. index df5289f..37ccab9 100644
  58. --- a/src/theory_core/theory_core.cpp
  59. +++ b/src/theory_core/theory_core.cpp
  60. @@ -710,7 +710,7 @@ TheoryCore::TheoryCore(ContextManager* cm,
  61. // d_termTheorems(cm->getCurrentContext()),
  62. d_predicates(cm->getCurrentContext()),
  63. d_solver(NULL),
  64. - d_simplifyInPlace(false),
  65. + d_simplifyInPlace(NULL),
  66. d_currentRecursiveSimplifier(NULL),
  67. d_resourceLimit(0),
  68. d_timeBase(0),