Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++undefined behavior catalogSingle-choice MCQ

Consider this union-based access. Under C++ (not C99) strict aliasing and lifetime rules, what is the status of the final read?

union U { int i; float f; }; U u; u.i = 0x40490fdb; float x = u.f; // read the non-active member