Reading an uninitialized object that is not backed by memory

suggest change

Reading an object will cause undefined behavior, if the object is1:

The variable a in the below example satisfies all those conditions:

void Function( void )
    int a;
    int b = a;

1 (Quoted from: ISO:IEC 9899:201X Lvalues, arrays, and function designators 2)

If the lvalue designates an object of automatic storage duration that could have been declared with the register storage class (never had its address taken), and that object is uninitialized (not declared with an initializer and no assignment to it has been performed prior to use), the behavior is undefined.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents