mirror of git://gcc.gnu.org/git/gcc.git
Add missing checks for _GLIBCXX_USE_C99_STDINT_TR1
The throw_allocator extension depends on <tr1/random> which depends on _GLIBCXX_USE_C99_STDINT_TR1. The Transactional Memory support uses fixed-width integer types from <stdint.h>. * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1] (random_condition, throw_value_random, throw_allocator_random) (std::hash<throw_value_random>): Do not define when <tr1/random> is not usable. * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not define transactional memory support when <stdint.h> is not usable. From-SVN: r263004
This commit is contained in:
parent
4957b284f1
commit
54c674327f
|
|
@ -1,5 +1,12 @@
|
|||
2018-07-26 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
|
||||
(random_condition, throw_value_random, throw_allocator_random)
|
||||
(std::hash<throw_value_random>): Do not define when <tr1/random> is
|
||||
not usable.
|
||||
* src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
|
||||
define transactional memory support when <stdint.h> is not usable.
|
||||
|
||||
* include/bits/hashtable_policy.h (__detail::__clp2): Use faster
|
||||
implementation that doesn't depend on <stdint.h> types.
|
||||
* include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
/**
|
||||
* @brief Base class for random probability control and throw.
|
||||
*/
|
||||
|
|
@ -596,7 +596,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
return _S_e;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
|
||||
/**
|
||||
* @brief Class with exception generation control. Intended to be
|
||||
|
|
@ -752,6 +752,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
#endif
|
||||
};
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
/// Type throwing via random condition.
|
||||
struct throw_value_random : public throw_value_base<random_condition>
|
||||
{
|
||||
|
|
@ -782,7 +783,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
operator=(throw_value_random&&) = default;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
|
||||
/**
|
||||
* @brief Allocator class with logging and exception generation control.
|
||||
|
|
@ -920,6 +921,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
~throw_allocator_limit() _GLIBCXX_USE_NOEXCEPT { }
|
||||
};
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
/// Allocator throwing via random condition.
|
||||
template<typename _Tp>
|
||||
struct throw_allocator_random
|
||||
|
|
@ -940,6 +942,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
|
||||
~throw_allocator_random() _GLIBCXX_USE_NOEXCEPT { }
|
||||
};
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
|
||||
_GLIBCXX_END_NAMESPACE_VERSION
|
||||
} // namespace
|
||||
|
|
@ -965,6 +968,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||
}
|
||||
};
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
/// Explicit specialization of std::hash for __gnu_cxx::throw_value_random.
|
||||
template<>
|
||||
struct hash<__gnu_cxx::throw_value_random>
|
||||
|
|
@ -979,6 +983,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
|
|||
return __result;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
} // end namespace std
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ _GLIBCXX_END_NAMESPACE_VERSION
|
|||
// declared transaction-safe, so we just don't provide transactional clones
|
||||
// in this case.
|
||||
#if _GLIBCXX_USE_WEAK_REF
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
|
@ -456,4 +457,5 @@ CTORDTOR(15underflow_error, std::underflow_error, runtime_error)
|
|||
|
||||
}
|
||||
|
||||
#endif // _GLIBCXX_USE_C99_STDINT_TR1
|
||||
#endif // _GLIBCXX_USE_WEAK_REF
|
||||
|
|
|
|||
Loading…
Reference in New Issue