2 ms·
Unions for type punning is actually entirely valid in C, it's only UB in C++. (I agree though that the C standard isn't actually relevant in the real world, mo
by flohofwoe 4y ago
Unions for type punning is actually entirely valid in C, it's only UB in C++.
(I agree though that the C standard isn't actually relevant in the real world, most C compilers treat it more or less as a 'suggestion', unless enforced with options like '-pedantic')