stddef include in gmp.h

Marc Glisse marc.glisse at inria.fr
Tue Oct 8 14:57:15 CEST 2013


On Tue, 8 Oct 2013, Marc Glisse wrote:

> On Tue, 8 Oct 2013, Marc Glisse wrote:
>
>> We currently have:
>> 
>> #define __need_size_t  /* tell gcc stddef.h we only want size_t */
>> #if defined (__cplusplus)
>> #include <cstddef>     /* for size_t */
>> #else
>> #include <stddef.h>    /* for size_t */
>> #endif
>> #undef __need_size_t
>> 
>> We should at least move the __need_size_t stuff so it only applies to 
>> stddef.h (not cstddef), or preferably remove it completely, it isn't worth 
>> the trouble. I am quite sure we already discussed that, but didn't get 
>> around to it yet.
>
> I found http://gmplib.org/list-archives/gmp-bugs/2008-July/001097.html where 
> TG already agreed that __need_size_t had to go, so I removed it:
>
> http://gmplib.org:8000/gmp/rev/6cd3658f5621

And I forgot again, but I'll try to do it later, we should just include 
stddef.h, not cstddef in C++, since we use a type called size_t and not 
one called std::size_t.

-- 
Marc Glisse


More information about the gmp-discuss mailing list