https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118141
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- for (int i = 0; i < 8; i++) { input_vec[i] = std::bit_cast<unsigned int>(((float*) input)[i]); } Is how to handle it for C++20. for (int i = 0; i < 8; i++) { memcpy(&input_vec[i], &((unsigned int*) input)[i], sizeof(unsigned int)); } Is how you use memcpy.