memory_order and C99

Andrew Haley aph@redhat.com
Thu Dec 4 19:05:00 GMT 2014


On 12/04/2014 06:35 PM, Cherry Vanc wrote:
> I see that C11 has additional features around memory_order
> (gcc/ginclude/stdatomic.h).
> 
> I am curious to know what the default behavior is in C99 ? does it
> assume sequential consistency model by default ? I tried looking up in
> the C99 standard, but couldnt find any reference.

You won't.  C99 doesn't really have any memory model.  It's safe to
assume that all data races are undefined behaviour.

Andrew.



More information about the Gcc-help mailing list