from C11 standards N1570 draft
J.2 Undefined behavior
— An lvalue designating an object of automatic storage duration that could have been declared with the register storage class is used in a context that requires the value of the designated object, but the object is uninitialized. (6.3.2.1).
I believe this is UB per the above: (it is obviously contrived)
Code:
int main()
{
int a;
int b=a;
printf("b=%d\n", b);
return 0;
}
If that is not the correct reference in the C11 standard, then please show me the correct one. Thanks.