News for hackers. Stuff that matters.
Re:No Sane Compiler Would Optimize Atomics by david-given on Saturday May 14, 2016 @11:11AM (#11696459)
Huh. You're quite right.

Well, it may have been undefined, but in practice the behaviour was standardised and couldn't be changed without breaking existing code... which is basically C in a nutshell.

Re:No Sane Compiler Would Optimize Atomics by caf on Saturday May 14, 2016 @09:59PM (#11699011)
Code like your example would have been broken by real standard library implementations very early in the piece, because even a forward-copying implementation that does word-at-a-time copies (a straightforward and obvious optimisation with real and significant benefits on many machines of the era) would have broken it.