4 ms·
The argument that it was once a bug of the C standard makes absolutely no sense. It is not allowed by C11. C99 does not talk about that because C99 does not off
by xorblurb 10y ago
The argument that it was once a bug of the C standard makes absolutely no sense. It is not allowed by C11. C99 does not talk about that because C99 does not officially support multithreading, but that has not prevented largely C99 compliant compilers from supporting multithreading, while this kind of "optimization" intrinsically prevents multithreading.
So the situation is just that, at one point, "optimizations" have been added by people who did not know what the where doing, and tried to hide, as usual for modern compiler authors, behind the literal wording of the C standard to justify their incompetence and the risks they force on the world.
- Bromskloss 10y ago> It is not allowed by C11. I see. Does GCC not support C11, or does it behave differently in this matter depending on whether it is in C11 mode or not? > tried to hide, as usual for modern compiler authors, behind the literal wording of the C standard to justify their incompetence and the risks they force on the world. I think that it's even worse to rely upon something that is not guaranteed by the letter of the standard.
- B1FF_PSUVM 10y ago> C11. C99 2k-30+70 weirds things.