Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdatomic.h>
- // https://clang.llvm.org/docs/LanguageExtensions.html#langext-c11-atomic
- // if stdatomic.h exists this program will not compile with clang
- // (doesn't work at all with g++ because it does not implicitly include its
- // own stdatomic)
- int main(int argc, char **argv)
- {
- _Atomic int x = 23;
- int y = 0;
- int z = 0;
- atomic_compare_exchange_strong(&x, &y, z);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement