Description
Bugzilla Link | 6313 |
Resolution | FIXED |
Resolved on | Feb 17, 2011 22:16 |
Version | trunk |
OS | Windows NT |
Blocks | llvm/llvm-bugzilla-archive#6815 |
Reporter | LLVM Bugzilla Contributor |
Extended Description
Here's the testcase :
#define __INTRIN_INLINE extern inline attribute((always_inline,gnu_inline))
__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
{
/* NOTE: ditto */
__sync_synchronize();
return __sync_lock_test_and_set(Target, Value);
}
This compiles fine in mingw32-gcc, but in clang I get two warnings :
warning: incompatible integer to pointer conversion returning 'int', expected 'void *'
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: incompatible integer to pointer conversion returning 'int', expected 'void *'
return __sync_lock_test_and_set(Target, Value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~