Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround clang4.0 <stdatomic.h> initialization
Texture fails to build with this error on clang 4.0: ``` external/Texture/pod_support/Headers/Public/AsyncDisplayKit/ASDispatch.h:32:35: error: illegal initializer type 'atomic_size_t' (aka '_Atomic(size_t)') __block atomic_size_t counter = ATOMIC_VAR_INIT(0); ^ In module 'std' imported from external/Texture/pod_support/Headers/Public/AsyncDisplayKit/ASStackUnpositionedLayout.h:18: /private/var/tmp/_bazel_bkase/a00d4cbe29902fb63d5778cc19944cd2/external/clang40/bin/../include/c++/v1/atomic:1839:30: note: expanded from macro 'ATOMIC_VAR_INIT' ^ 1 error generated. ``` See http://techqa.info/programming/question/38233019/Initializing-an--atomic-int--with-a-braced-constant--Is-this-valid-C-code--If-so-why-does-it-not-compile-in-clang- Replacing the intialization with just 0 (and not the macro fixes the error). For now this is safe because the macro just expands to the value.
- Loading branch information