GNU89, mixed declarations and loop initial declarations
问题 The default C dialect for GCC and ICC is GNU89. GNU89 allows mixed declarations e.g. int i; i = 0; int j; I inferred (incorrectly) from a number of other posts on SO e.g C: for loop int initial declaration, that this meant I could do for(int i=0; i<n; i++) with GNU89 but when I do this I get error: 'for' loop initial declarations are only allowed in C99 mode Apparently, mixed declarations and loop initial declarations are not the same thing (i.e. one does not imply the other). If I could only