Re:Things Rust shipped without
by veddan on Friday July 03, 2015 @04:01PM
(#9827637)
Going through a union is the correct way of viewing one type as another. Casting pointers to accomplish this is undefined behaviour (except for char *) and compilers do TBBA (type-based alias analysis) based on the assumption you don't do it. Famously, the Linux kernel does this a lot and needs to be compiled with -fno-strict-aliasing.
[ Parent
| on HN ]
There are no comments on this comment yet.