Use union instead of reinterpret_cast