pointer <-> integer conversion warnings (bogus -Wall warnings)

Tom Lord lord@emf.net
Wed Mar 13 23:34:00 GMT 2002



   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 *)


-t



More information about the Gcc mailing list