J
Joachim Schmitz
As the subject saysChris Hills said:Isn't all of this OT?
As the subject saysChris Hills said:Isn't all of this OT?
Does this mean I have to change my name to Richard?
There is one thing we know about C/C++ : it invokes undefined behaviour in
both C and C++.
Army1987 said:Sure? C is only modified once...
Unless C is 0, a NaN, or an infinity, it is equivalent to (++C, 1).
Or is it?
No, it isn't.
Why should the numerator be evaluated before the denominator and its
side-effects ?
For C=1, the expression could evaluate to 2, with C=-2 you would get 0.
C/C++ invokes undefined behaviour.
Flash Gordon said:Charlie Gordon wrote, On 17/09/07 15:37:
Of course, the reason the behaviour is undefined has nothing to do with
order of evaluation. It is because C is modified and read for a purpose
other than determining the new value of C with no intervening sequence
point.
I merely gave a practical example of why behaviour cannot be defined.
Old Wolf said:Your example does not show that. Unspecified behaviour
would be consistent with your example. In fact, so would
defined behaviour.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.