This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re:
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Richard Henderson <rth at redhat dot com>, libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Mar 2007 06:28:25 +0200
- Subject: Re:
- References: <20070327220453.GA4342@redhat.com> <46099F40.4060409@suse.de>
- Reply-to: bonzini at gnu dot org
> 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;
You can also use
typedef unsigned int __attribute__((__mode__(__pointer__))) _UIntPtrType;
Paolo