You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamic initialization of a block variable with static storage duration or thread storage duration is performed the first time control passes through its declaration; such a variable is considered initialized upon the completion of its initialization. If the initialization exits by throwing an exception, the initialization is not complete, so it will be tried again the next time control enters the declaration.
Presumably, once the initialization of such a variable is complete, the variable will not be initialized even though the control passes through its declaration. However, this meaning is not clear in the current wording. Moreover, the next time control(i.e. not the first time) case contradicts "the first time control passes". It reads not nature since we rigidly redefine the re-enter case(i.e. the initialization is not complete). The suggestion might be:
Dynamic initialization of a block variable with static storage duration or thread storage duration is performed if the first time control passes through its declaration and either
the variable has not been yet initialized, or
its initialization is not complete
such a variable is considered initialized upon the completion of its initialization. If the initialization exits by throwing an exception, the initialization is not complete.
[note: so the initialization will be tried again the next time control enters the declaration — end note]
This might be clearer.
The text was updated successfully, but these errors were encountered:
[stmt.dcl] p3 says
Presumably, once the initialization of such a variable is complete, the variable will not be initialized even though the control passes through its declaration. However, this meaning is not clear in the current wording. Moreover, the next time control(i.e. not the first time) case contradicts "the first time control passes". It reads not nature since we rigidly redefine the re-enter case(i.e. the initialization is not complete). The suggestion might be:
This might be clearer.
The text was updated successfully, but these errors were encountered: