2 ms·
See other comments, some variant of "type punning via union is not allowed according to the C standard" is what made Linus responding like that. Moreover, even
by acqq 8y ago
See other comments, some variant of "type punning via union is not allowed according to the C standard" is what made Linus responding like that. Moreover, even using union for that is a compiler switch in gcc, to avoid compiler following "the standard." Linus points that following the standard is definitely wrong thing to do:
"When documented gcc behavior says one thing, and the standard might be
unclear, we really don't care one whit about the lack of clarity in
some standard."
I think the union thing was at least initially implemented as not functioning at all in clang, where developers "followed the standard."