| ▲ | repelsteeltje 2 hours ago | |
There is a difference between UB in C, and something being undefined in some version of Microsoft C on Windows. Many of C's UB is specifically, intentionally left undefined in the standard to express code that relies on some specific way it is handled, is not proper, portable C. Indeed, the DWORD-sized memory access being atomic doesn't apply to MS Windows prior to version 3.0 running on a 80286. It's UB because the ISO C spec says it's UB. | ||