R
rahul
int i = 0;
i = i++;
I noticed that some people say this is undefined as the value of a
variable can not be accessed twice between two sequence points.
But I think the standard says that a variable can not be modified
twice between two sequence points. And in this case, it is modified
just once. So,
a = a++ + a++;
is undefined but not i = i++.
Correct me if I am wrong as I don't own a copy of the standards. I
read this stuff in some book.
i = i++;
I noticed that some people say this is undefined as the value of a
variable can not be accessed twice between two sequence points.
But I think the standard says that a variable can not be modified
twice between two sequence points. And in this case, it is modified
just once. So,
a = a++ + a++;
is undefined but not i = i++.
Correct me if I am wrong as I don't own a copy of the standards. I
read this stuff in some book.