(Why) is using an uninitialized variable undefined behavior?
Yes this behavior is undefined but for different reasons than most people are aware of. First, using an unitialized value is by itself not undefined behavior, but the value is simply indeterminate. Accessing this then is UB if the value happens to be a trap representation for the type. Unsigned types rarely have trap representations, … Read more