3 ms·
Race conditions are undefined behavior though. It's even included in that post you just linked as an example of undefined behavior. > There are many other kind
by lalaland1125 7y ago
Race conditions are undefined behavior though. It's even included in that post you just linked as an example of undefined behavior.
> There are many other kinds of course, including sequence point violations like "foo(i, ++i)", race conditions in multithreaded programs, violating 'restrict', divide by zero, etc.
(And no, volatile does not save you.)
- gpderetta 7y ago> Race conditions these are more precisely called data races. And yes, they are UB in C/C++.