[PATCH] score: PR1607: Add and use CPU_SIZEOF_POINTER

Chris Johns chrisj at rtems.org
Mon Nov 5 01:41:32 UTC 2012


Joel Sherrill wrote:
>
> I believe this is a predefine for all configurations of gcc. There is no point duplicating this logical in RTEMS.
>

For RTEMS or even recent cross-compiled gccs this may be true but it is 
not always the case. The MacOS and FreeBSD gcc's do not. I see clang 
supports __SIZEOF_POINTER__ as well as __POINTER_WIDTH__ which is nice. 
A 4.6.3 arm-eabi-gcc (non-RTEMS) has it.

I am fine with rejecting a compiler that does not provide 
__SIZEOF_POINTER__ and using it.

Chris



More information about the devel mailing list