Given the snippet, why does the standard say this is Undefined Behavior even though it 'works' on most compilers, and what is the conforming fix?float f = 1.0f; std::uint32_t bits = *reinterpret_cast<std::uint32_t*>(&f);