Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 21994

what happened if store with memory_order_acquire

$
0
0

as we know:load with memory_order_acquire,store with memory_order_releaseHowever, I found with gcc4.8.2, open -O2, a compile error throwed, /usr/include/c++/4.8.2/atomic:199:9: error: invalid memory model for '__atomic_store'but if close -O2, the error disappeared

further more, if with gcc8.3.0, the error would throwed even when with -O2

So what happend? how to explain this?


Viewing all articles
Browse latest Browse all 21994

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>