If a name introduced in an
init-statement or for-range-declaration
is redeclared in the outermost block of the substatement, the program is ill-formed.
[Example 2: void f(){for(int i =0; i <10; ++i)int i =0; // error: redeclarationfor(int i :{1, 2, 3})int i =1; // error: redeclaration} — end example]