5 For such an object that does not have a variable length array type, its lifetime extends
from entry into the block with which it is associated until execution of that block ends in
any way. (Entering an enclosed block or calling a function suspends, but does not end,
execution of the current block.) If the block is entered recursively, a new instance of the
object is created each time. The initial value of the object is indeterminate. If an
initialization is specified for the object, it is performed each time the declaration is
reached in the execution of the block; otherwise, the value becomes indeterminate each
time the declaration is reached
就是说,如果重复递归的进入这个block,那么就会生成这个object的一个实例。如果每次都声明并初始化一个值给这个object实例,那么这个object的值就是确定的,否则就是不确定的。那么进入这个block的方式通常有:
第一种:通过函数调用反复的进入一个block,这个block肯定每次都会执行初始化语句,那么值必然是确定的。
第二种:通过循环不断进入一个block,那么每次也会执行初始化语句,那么值必然是确定的。
第三种:通过goto这种跳转语句不断进入一个blcok,由于跳转的位置,可能不会执行block中的初始化语句,而直接使用object这个实例,那么值是不确定的。
总之,一句话,一个对象只要初始化了,那么值就是确定的,如果没有初始化,那么值就是不确定的。
6 For such an object that does have a variable length array type, its lifetime extends from
the declaration of the object until execution of the program leaves the scope of the
declaration.27) If the scope is entered recursively, a new instance of the object is created
each time. The initial value of the object is indeterminate
关于VLA类型的object,该类型在声明的时候不能进行初始化,所以就有一个问题,每次声明生成一个该对象的实例,由于没有进行初始化,所以其值是不确定的。
这也就是在上面第六点所说的,VLA类型的object,如果反复的进入一个block,那么该object实例的值是不确定的,因为声明的时候无法同时初始化。