You can't jump over initialization of an object.
size_t i = 0;
is an initialization, while
size_t i;
i = 0;
is not.
The C++ Standard says:
It is possible to transfer into a block, but not in a way that bypasses declarations with initialization. A program that jumps from a point where a local variable with automatic storage duration is not in scope to a point where it is in scope is ill-formed unless the variable has POD type (3.9) and is declared without an initializer.