This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>, DJ Delorie <dj at redhat dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 7 Nov 2014 10:56:51 -0600
- Subject: Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)
- Authentication-results: sourceware.org; auth=none
- References: <545CE038 dot 5000403 at oarcorp dot com> <545CE454 dot 1000201 at oracle dot com>
On 11/7/2014 9:25 AM, Paolo Carlini wrote:
> Hi,
>
> On 11/07/2014 04:07 PM, Joel Sherrill wrote:
>> Hi
>>
>> On m32c-rtems, we have a build error in C++ because size_t
>> is 16-bits and pointers are 24 bits. m32c-elf probably does not
>> enable __GTHREAD support like rtems does. Since this is code
>> shared across targets, what is the best way to fix this?
> I don't know the exact opinion of the other library maintainers, but
> personally I consider mt_allocator an old experiment, which, definitely,
> to make any sense today would need profound changes. In particular, I
> don't think we can hope to get something useful from it when size_t is
> 16 bits and, more importantly, pointers are 24 bits. Thus, my
> recommendation would be just arranging for its code not to break
> bootstrap, nothing more than that.
OK. I am building now with the size_t changed to uintptr_t. I tried to get
the type definition by including <cstdint> but it didn't compile. Using
<stdint.h>, the bootstrap is moving along.
I will post a patch once the bootstrap is finished.
Thanks for the quick feedback.
> Paolo.
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985