[RFC] num_put::do_put(const void*) when sizeof(long) != sizeof(void*)

Paolo Carlini pcarlini@suse.de
Mon Aug 23 23:22:00 GMT 2004


> perhaps I have already asked, but I want to make sure we agree about the
> details of this issue: in num_put<>::do_put(const void* val) we cast val
> to unsigned long: what happens if sizeof(unsigned long) != sizeof(void*)?
> Are there real and important targets like that? In this case the code may
> become quite a bit more complex...

Replying to myself (and to Phil too) : some time ago Phil asked whether
keeping _GLIBCXX_USE_LONG_LONG (now that we don't need anymore
specific support from libc in order to do I/O of long long types) had 
any real
value: only now I realize that if we have the do_get/do_put overloads 
for long
long types always enabled, then most probably the issue above can be 
trivially
fixed by casting to unsigned long long instead of unsigned long... Good!

What do we all think about removing _GLIBCXX_USE_LONG_LONG?

Thanks,
Paolo.



More information about the Libstdc++ mailing list