4 ms·
Unfortunately, this is not true in the case of type punning. C used to be the language you used when you wanted to access bits. Now with C99 you cannot * (int16
by wingo 18y ago
Unfortunately, this is not true in the case of type punning. C used to be the language you used when you wanted to access bits. Now with C99 you cannot * (int16* )((int32* )x).
NB, all compilers make exceptions for unions, but the type punning rule stands, and at work we've actually seen code like the above (for a dynamic typing system) compile to NULL instead of the appropriate reference with GCC. Grrrrrrr.