[patch] 10/n: trans-mem: compiler tests (1 of 3)
Joseph S. Myers
joseph@codesourcery.com
Thu Nov 3 20:33:00 GMT 2011
On Thu, 3 Nov 2011, Aldy Hernandez wrote:
> +#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
> +typedef unsigned long long ptrcast;
> +#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
> +typedef unsigned long ptrcast;
> +#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
> +typedef unsigned int ptrcast;
> +#else
> +#error Add target support here
> +#endif
Using __UINTPTR_TYPE__ (or including <stdint.h> and using uintptr_t) would
seem better.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list