This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pointer <-> integer conversion warnings (bogus -Wall warnings)
On 13-Mar-2002, Tom Lord <lord@emf.net> wrote:
>
> From: Fergus Henderson <fjh@cs.mu.OZ.AU>
> #if PTRDIFF_MAX >= INT_MAX
> typedef ptrdiff_t intptr_cast_type;
> #else
> typedef int intptr_cast_type;
> #endif
>
> A reasonable and plausible future system can have both:
>
> sizeof(ptrdiff_t) < sizeof(void *)
> and
> sizeof(int) < sizeof(void *)
The code in question will still work on such a system.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.