4 ms·
C11 6.7.9 (10): If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. If an object that has static or thr
by anon1385 9y ago
C11 6.7.9 (10):
If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. If an object that has static or thread storage duration is not initialized explicitly, then:
— if it has pointer type, it is initialized to a null pointer;
- deleted 9y ago[deleted]
- sigjuice 9y agoHow is the C11 standard applicable to a C++ program?
- anon1385 9y agoI didn't notice it was C++. In C++14: From 3.6.2: >Variables with static storage duration (3.7.1) or thread storage duration (3.7.2) shall be zero-initialized (8.5) before any other initialization takes place and from 8.5: >To zero-initialize an object or reference of type T means >--if T is a scalar type (3.9), the object is initialized to the value obtained by converting the integer literal 0 (zero) to T and from 3.9: >Arithmetic types (3.9.1), enumeration types, pointer types, pointer to member types (3.9.2), std::nullptr_- t, and cv-qualified versions of these types (3.9.3) are collectively called scalar types