[cfe-dev] Clang::SemaCXX/reinterpret-cast.cpp failing

Benjamin Kramer benny.kra at googlemail.com
Sun Nov 22 10:19:27 PST 2009


Am 22.11.2009 um 18:44 schrieb Sean Hunt:

> Ahmed Charles wrote:
>> Noticed your checkin, but it fails with this error:
>> 
>> error: 'error' diagnostics seen but not expected:
>>  Line 25: cast from pointer to smaller type 'intptr_t' (aka 'int') 
>> loses information
>>  Line 29: cast from pointer to smaller type 'intptr_t' (aka 'int') 
>> loses information
>> 14 diagnostics generated.
> 
> Hmm - that's smells fishy. Is this a 64-bit system? If so, that probably 
> indicates a problem with the definition of intptr_t; it should always be 
> at least as wide as the platform's pointer.

We define intptr_t as a signed long unless the target overrides it.
I attached a small untested patch that corrects it for Win64.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: win64.patch
Type: application/octet-stream
Size: 581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091122/f766d369/attachment.obj>


More information about the cfe-dev mailing list