[cfe-dev] sizeof(long) in OpenCL C
Erik Schnetter
schnetter at gmail.com
Sat Aug 31 12:21:03 PDT 2013
I have proposed an updated patch on cfe-commits.
-erik
On 2013-08-30, at 14:08 , Michele Scandale <michele.scandale at gmail.com> wrote:
> On 08/30/2013 07:00 PM, David Tweed wrote:
>> Hi,
>>
>> | 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?
>>
>> Unfortunately not; implementation (even such simple things as choice of
>> size) of pointers for OpenCL devices is one of those "implementations may
>> make different choices" areas where things don't map cleanly to the standard
>> clang front-end.
>
> Uhm.. Implementation defined types makes type size enforcing complex. If the mapping must be direct I think there is no solution.
>
> If the relationship is just between implementation defined type and (sign, bitwidth) then the mapping can be done on the fly looking for the pair (sign, bitwidth) in the native types map, picking a compatible type.
> The fact that there is no direct control on the mapping can be an issue.
>
> -Michele
--
Erik Schnetter <schnetter at gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130831/98a02562/attachment.sig>
More information about the cfe-dev
mailing list