A
avsharath
In "Bjarne Stroustrup's C++ Style and Technique FAQ" at:
http://www.research.att.com/~bs/bs_faq2.html#evaluation-order
for the statement:
f(v,i++);
he says that "the result is undefined because the order of evaluation
of function arguments are undefined".
But AFAIK, the order of evaluation of function arguments is unspecified
as the C++ Standard says:
"5.2.2 Function
The order of evaluation of arguments is unspecified."
So isn't he wrong at this?
I think it is undefined because the value of 'i' is accessed and also
moidified within the sequence point and hence it is undefined.
Sharath A.V
http://www.research.att.com/~bs/bs_faq2.html#evaluation-order
for the statement:
f(v,i++);
he says that "the result is undefined because the order of evaluation
of function arguments are undefined".
But AFAIK, the order of evaluation of function arguments is unspecified
as the C++ Standard says:
"5.2.2 Function
The order of evaluation of arguments is unspecified."
So isn't he wrong at this?
I think it is undefined because the value of 'i' is accessed and also
moidified within the sequence point and hence it is undefined.
Sharath A.V