This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++]
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Richard Henderson <rth at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Mar 2007 00:48:32 +0200
- Subject: Re: [libstdc++]
- References: <20070327220453.GA4342@redhat.com>
Hi,
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
something like:
typedef __gnu_cxx::__conditional_type<(sizeof(const void*) <=
sizeof(unsigned long)), unsigned long, unsigned long long>::__type
_UIntPtrType;
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.
Paolo.