When I'm defining some variables like this:
int a = pop(), b = pop(), c = pop();
does C++ give a guarantee that a is going to be initialized first, then b and then c? or is the order not defined?
[dcl.decl]/3 says
-3- Each init-declarator in a declaration is analyzed separately as if it was in a declaration by itself.
Which means your code is treated like:
int a = pop();
int b = pop();
int c = pop();
T a,b,c is a "sequence" and is equivalent to T a;T b;T c;. The word "usually" refers not to exception in the comprehension of a sequence, but to the potential collision of identifiers: T a, T, b, c; is surely not equivalent to T a; T T; T b; T c;. Therefore I agree that it is defined, but damn, I'd like it to be written plainly as a proper point, not a footnote..
for (int a = pop(), b = pop(), c = pop(); ...)then the question is more interesting. You could put two of the declarations on the previous line, but now they have a different scope