Modify some library internals to work without <stdint.h>
authorJonathan Wakely <jwakely@redhat.com>
Thu, 26 Jul 2018 14:02:05 +0000 (15:02 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 26 Jul 2018 14:02:05 +0000 (15:02 +0100)
commit4957b284f1ac52ce14b15fe3b915d46776d624ec
treec660dc5850b246f90c589c6f332a70c8e3c86214
parent612c9c702e2c9ebf0058d659d57371605c2e0020
Modify some library internals to work without <stdint.h>

std::__detail::__clp2 used uint_fast32_t and uint_fast64_t without
checking _GLIBCXX_USE_C99_STDINT_TR1 which was a potential bug. A
simpler implementation based on the new std::__ceil2 code performs
better and doesn't depend on <stdint.h> types.

std::align and other C++11 functions in <memory> where unnecessarily
missing when _GLIBCXX_USE_C99_STDINT_TR1 was not defined.

* 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
std::size_t when std::uintptr_t is not usable.
[!_GLIBCXX_USE_C99_STDINT_TR1] (pointer_safety, declare_reachable)
(undeclare_reachable, declare_no_pointers, undeclare_no_pointers):
Define independent of _GLIBCXX_USE_C99_STDINT_TR1.

From-SVN: r263003
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/std/memory