[cfe-dev] sizeof(long) in OpenCL C
John McCall
rjmccall at apple.com
Fri Aug 30 10:39:27 PDT 2013
On Aug 30, 2013, at 8:15 AM, Erik Schnetter <schnetter at gmail.com> wrote:
> I notice that, with the patch applied, "long" has 64 bits, but __INTPTR_TYPE__ is still defined as "long int" on ARM. This is now wrong; it needs to be set to "int" instead. Do you have pointers for correcting this in clang?
>
> There are similar issues with e.g. __INT64_TYPE__ (should now be "long" instead of "long long”)
Specifying the size of “long” must have seemed clever to someone, but it fundamentally changes the target in some pretty intrusive ways, and frankly it ought to be represented somehow in the target triple and everything that depends on it. That is, Open CL targeting ARM is no longer just the ordinary ARM target, and a significant amount of code (e.g. the ABI lowering code in IR-gen) needs to be revisited to see whether it’s still applicable in the face of this change.
John.
More information about the cfe-dev
mailing list