2 ms·
The C standard even describes the probable result of undefined behaviour as ranging from "ignoring the situation completely with unpredictable results, to behav
by to3m 12y ago
The C standard even describes the probable result of undefined behaviour as ranging from "ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment". But for some reason nobody seems to pay any attention to the second possibility.
I don't know why people like the current situation so much. Strikes me it's bad for everybody. If you know how the underlying system works, you'll be confused by this second pile of strange rules that you now have to keep on top of; if you don't know the underlying system works, you're no better served by these new rules than you would have been by simply finding out. And it's not even like most systems these days vary all that much! - assuming you can even find something that isn't ARM/x86/x64 in the first place <-- this statement may be mildly tongue in cheek.
Very strange.
My favourite link on the subject is http://robertoconcerto.blogspot.co.uk/2010/10/strict-aliasing.html http://robertoconcerto.blogspot.co.uk/2010/10/strict-aliasin.... "The C compiler writers have no idea who their users are" seems plausible :)