Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-10 Thread Jonathan Wakely
On 10 November 2014 16:49, Joel Sherrill wrote: > I just submitted a patch using stdint.h and uintptr_t to gcc-patches. libstdc++ patches must be CCd to the libstdc++ list.

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-10 Thread Joel Sherrill
On 11/10/2014 10:59 AM, Joseph Myers wrote: > On Mon, 10 Nov 2014, Joel Sherrill wrote: > >> On 11/10/2014 10:32 AM, Joseph Myers wrote: >>> On Sat, 8 Nov 2014, Paolo Carlini wrote: >>> Good. Sorry, if I missed some relatively recent development: is now GCC installing its own stdint.h on

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-10 Thread Joseph Myers
On Mon, 10 Nov 2014, Joel Sherrill wrote: > On 11/10/2014 10:32 AM, Joseph Myers wrote: > > On Sat, 8 Nov 2014, Paolo Carlini wrote: > > > >> Good. Sorry, if I missed some relatively recent development: is now GCC > >> installing its own stdint.h on *all* the supported targets, thus we can > >> s

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-10 Thread Paolo Carlini
Hi, On 11/10/2014 05:49 PM, Joel Sherrill wrote: On 11/10/2014 10:32 AM, Joseph Myers wrote: On Sat, 8 Nov 2014, Paolo Carlini wrote: Good. Sorry, if I missed some relatively recent development: is now GCC installing its own stdint.h on *all* the supported targets, thus we can safely No; I s

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-10 Thread Joel Sherrill
On 11/10/2014 10:32 AM, Joseph Myers wrote: > On Sat, 8 Nov 2014, Paolo Carlini wrote: > >> Good. Sorry, if I missed some relatively recent development: is now GCC >> installing its own stdint.h on *all* the supported targets, thus we can >> safely > No; I sent a list of targets missing the infor

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-10 Thread Joseph Myers
On Sat, 8 Nov 2014, Paolo Carlini wrote: > Good. Sorry, if I missed some relatively recent development: is now GCC > installing its own stdint.h on *all* the supported targets, thus we can safely No; I sent a list of targets missing the information in

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-08 Thread Paolo Carlini
Hi, On 11/08/2014 04:33 PM, Jonathan Wakely wrote: On 8 November 2014 15:30, Joel Sherrill wrote: This didn't compile. Ended with an error about requiring C++11 in a header file. This code is in a c++98 subdirectory so it dues make sense. I can't cut and paste it at home. Yep, that makes sen

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-08 Thread Jonathan Wakely
On 8 November 2014 15:30, Joel Sherrill wrote: > This didn't compile. Ended with an error about requiring C++11 in a header > file. This code is in a c++98 subdirectory so it dues make sense. I can't cut > and paste it at home. Yep, that makes sense, I'd just stick with stdint.h

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-08 Thread Joel Sherrill
On November 8, 2014 9:04:14 AM CST, Joel Sherrill wrote: > > >On November 8, 2014 9:00:02 AM CST, Jonathan Wakely > wrote: >>On 7 November 2014 16:56, Joel Sherrill wrote: >>> >>> On 11/7/2014 9:25 AM, Paolo Carlini wrote: Hi, On 11/07/2014 04:07 PM, Joel Sherrill wrote: > Hi

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-08 Thread Joel Sherrill
On November 8, 2014 9:00:02 AM CST, Jonathan Wakely wrote: >On 7 November 2014 16:56, Joel Sherrill wrote: >> >> 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 >

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-08 Thread Joel Sherrill
On November 8, 2014 9:00:02 AM CST, Jonathan Wakely wrote: >On 7 November 2014 16:56, Joel Sherrill wrote: >> >> 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 >

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-08 Thread Jonathan Wakely
On 7 November 2014 16:56, Joel Sherrill wrote: > > 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 >>> e

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-07 Thread Joel Sherrill
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 co

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-07 Thread Paolo Carlini
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

Re: mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-07 Thread Joel Sherrill
Attached is a patch which changes size_t to uintptr_t. It is enough to let the build continue. But I would appreciate feedback given the code. --joel On 11/7/2014 9:07 AM, 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

mt_allocator.cc assumes sizeof(size_t) == sizeof(void *)

2014-11-07 Thread Joel Sherrill
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? My first inclination would be to use uintptr_t for t