Nothing to do with the for
loop. This also doesn't compile if you write int a = 0, short b = 0;
outside of any loop.
So the answer is: it is always forbidden to declare two variables of different types in a single statement.
Edit: Oh, for the pedantic, I do realise that you can declare a base type and a pointer type in the same statement, for instance an int and an int pointer, so those would be different types, yes.
Hm, that makes me think. In a 32 bit environment, a pointer would be 4 bytes, just like an int, so you could use short a = 0, *b = 0; and then cast b to an int. Hm...