История изменений
Исправление Manhunt, (текущая версия) :
Я же говорю - это антилюди. У них логика другая в принципе.
Открой стандарт (даже не на с++, на ссаный си), и там английским по белому написано:
5.1.2.3 Program execution
The semantic descriptions in this International Standard describe the behavior of an abstract machine in which issues of optimization are irrelevant.
Accessing a volatile object, modifying an object, modifying a file, or calling a function that does any of those operations are all side effects,11) which are changes in the state of the execution environment. Evaluation of an expression may produce side effects. At certain specified points in the execution sequence called sequence points, all side effects of previous evaluations shall be complete and no side effects of subsequent evaluations shall have taken place. (A summary of the sequence points is given in annex C.)
In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce that its
value is not used and that no needed side effects are produced (including any caused by calling a function or accessing a volatile object).
When the processing of the abstract machine is interrupted by receipt of a signal, only the values of objects as of the previous sequence point may be relied on. Objects that may be
modified between the previous sequence point and the next sequence point need not have received their correct values yet.
То есть с самого начала, по замыслу авторов стандарта, речь идёт не о каком-то там «макроассемблере», а об абстрактной плохо определенной херне, которую компилятор вертит как хочет. Когда ты сделал UB - считай, что абстрактную машину распидорасило, кровь, кишки. Вот такой ублюдочный по определению язык этот ваш си и с++.
Исходная версия Manhunt, :
Я же говорю - это антилюди. У них логика другая в принципе.
Открой стандарт (даже не на с++, на ссаный си), и там английским по белому написано:
5.1.2.3 Program execution
The semantic descriptions in this International Standard describe the behavior of an abstract machine in which issues of optimization are irrelevant.
Accessing a volatile object, modifying an object, modifying a file, or calling a function that does any of those operations are all side effects,11) which are changes in the state of the execution environment. Evaluation of an expression may produce side effects. At certain specified points in the execution sequence called sequence points, all side effects of previous evaluations shall be complete and no side effects of subsequent evaluations shall have taken place. (A summary of the sequence points is given in annex C.)
In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce that its
value is not used and that no needed side effects are produced (including any caused by calling a function or accessing a volatile object).
When the processing of the abstract machine is interrupted by receipt of a signal, only the values of objects as of the previous sequence point may be relied on. Objects that may be
modified between the previous sequence point and the next sequence point need not have received their correct values yet.
То есть с самого начала, по замыслу авторов стандарта, речь идёт не о каком-то там «макроассемблере», а об абстрактной плохо определенной херне, которую компилятор вертит как хочет. Когда ты сделал UB - считай, что абстрактную машину распидорасило, кровь, кишки. Вот такой ублюдочный по определению язык этот ваш си и с++.