+2014-11-14 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * src/c++98/mt_allocator.cc: Fix assumption that sizeof(void *) is
+ equal to sizeof(size_t). The m32c breaks this assumption.
+
2014-11-14 Jonathan Wakely <jwakely@redhat.com>
* config/abi/pre/gnu.ver: Add new exports.
#include <ext/mt_allocator.h>
#include <cstring>
+// The include file is needed for uintptr_t. If this file does not compile,
+// check to make sure the target has <stdint.h> and that it provides
+// uintptr_t.
+#include <stdint.h>
+
namespace
{
#ifdef __GTHREADS
__freelist& freelist = get_freelist();
{
__gnu_cxx::__scoped_lock sentry(get_freelist_mutex());
- size_t _M_id = reinterpret_cast<size_t>(__id);
+ uintptr_t _M_id = reinterpret_cast<uintptr_t>(__id);
typedef __gnu_cxx::__pool<true>::_Thread_record _Thread_record;
_Thread_record* __tr = &freelist._M_thread_freelist_array[_M_id - 1];
{
__freelist& freelist = get_freelist();
void* v = __gthread_getspecific(freelist._M_key);
- size_t _M_id = (size_t)v;
+ uintptr_t _M_id = (uintptr_t)v;
if (_M_id == 0)
{
{