Displaying 2 results from an estimated 2 matches for "_osatomic_int32_t".
2016 Jul 01
2
How to resolve conflicts between sanitizer_common and system headers
..._relaxed into global namespace?
The header used to use std namespace locally before accessing those symbols, which caused the error when building clang:
#define _OSATOMIC_USING_NAMESPACE_STD() using namespace std
...
{
_OSATOMIC_USING_NAMESPACE_STD();
return (atomic_fetch_add_explicit((volatile _OSAtomic_int32_t*) __theValue,
__theAmount, memory_order_relaxed) + __theAmount);
}
They worked around the problem by qualifying the symbol with "std::":
#define OSATOMIC_STD(_a) std::_a
...
{
return (OSATOMIC_STD(atomic_fetch_add_explicit)(
(volatile _OSAtomic_int32_t*) __theValue, __theAmount,...
2016 Jul 01
2
How to resolve conflicts between sanitizer_common and system headers
Hi Sanitizer Runtime Developers,
We recently ran into a problem building clang because some of the definitions in sanitizer_common conflicted with system definitions and later another system header was trying to use the system definition:
.../usr/include/libkern/OSAtomicDeprecated.h:756:17: error: reference to 'memory_order_relaxed' is ambiguous
__theAmount, memory_order_relaxed) +