The declaration must be part of block 1 .
The list of block elements contains a block element 2 .
And the list of element blocks can only be inside the brackets, as part of compound statement 3 .
In C ++, this is different because the statement statement is included in the statement (the first allows variables to be defined using the block statement).
(Quoted from ISO / IEC 9899: 201x 6.8.2 Compound Application 1)
1 block point:
declaration
2 block-item-list:
block point
item list block
3 compound expression:
{block-item-list opt}
source share