Relative Content

Tag Archive for c++undefined-behaviorlanguage-lawyerunions

Accessing inactive union member and undefined behavior?

I was under the impression that accessing a union member other than the last one set is UB, but I can’t seem to find a solid reference (other than answers claiming it’s UB but without any support from the standard).

Accessing inactive union member and undefined behavior?

I was under the impression that accessing a union member other than the last one set is UB, but I can’t seem to find a solid reference (other than answers claiming it’s UB but without any support from the standard).