Pretty clear in the title, I think. I'm not quite sure about this, and I cannot find a good answer through Googles (alas, I am not committed to the fine art of standards-fu), so I ask:
int i = x++, j = x++;
Is it determined? I am sure that the i = x++, j = x++; normal operator will be undefined behavior - this is a comma operator, which is a sequence point and will be legal, but without a source it is clear enough whether the initializer ends with a semicolon or when the next variable is declared, and since it is not used by a comma, I can not find a clear answer. Thus, either: a) the comma ends the initializer, is a point in the sequence, and this works, or b) it is not. What is it?
And to rule out, I know that I have to simplify the headache and just write it as:
int i = x++;
int j = x++;
And ensure that it is defined. I ask more out of curiosity.
source
share