Is there a way to create a for loop with only two expressions in C?

c, for-loop

Solution

The production for `declaration` is:

declaration: declaration-specifiers init-declarator-listopt ;

So the semicolon is already part of it.

Problem

I came across this in the C standard text, any version I can find for C99 or C11, at §6.8.5 : ``` iteration-statement: while ( expression ) statement do statement while ( expression ) ; for ( expression ; expression ; expression ) statement for ( declaration expression ; expression ) statement ``` The fourth item here seems to be a `for` with only one semicolon, and I don't see any reference to this syntax anywhere else. Can anyone here explain what am I missing?

Original source