|
|
|
|
|
by ynik
354 days ago
|
|
Under your interpretation, neither gcc nor clang are POSIX compliant.
Because in practice all these optimizing compilers will reorder memory accesses without bothering to prove that the pointers involved are valid -- the compiler just assumes that the pointers are valid, which is justified because otherwise the program would have undefined behavior. |
|
But to make optimizations pretending it is an invariant, it can't happen, when the specification clearly says it could happen. That's wild, and I would argue out of specification.