Tue Mar 27 23:29:00 GMT 2007
>Something like the following is required for Win64, which is a P64 target.
I'm sure, I already briefly considered this issue, don't remember
exactly the context.
>I'm not sure what's required generically to assert that intptr_t is
>present; certainly it's available on Linux and Win64...
Yes, that's a problem, it's available only in C99, and we can't assume
that kind of libc, in general. I don't know, maybe we can use long long
(or maybe better, unsigned long long), and choose the right type via
typedef __gnu_cxx::__conditional_type<(sizeof(const void*) <=
sizeof(unsigned long)), unsigned long, unsigned long long>::__type
Is it sufficient to cover all the targets where libstdc++ actually
works? One, more general issue in the context of C++03, is that if
_GLIBCXX_USE_LONG_LONG is undefined neither unsigned long long (neither
uintptr_t for that matter) can be output because operator<<(unsigned
long long) is missing. Probably, however, that problem isn't real
anymore, because long long is already in the working draft of C++0x and
we can assume it to be available unconditionally.
More information about the Gcc-patches