------- Comment #4 from steven at gcc dot gnu dot org 2007-11-29 17:23 ------- Try compiling with -fno-strict-aliasing. This is only automatically enabled at -O2 or higher. See the fine manual.
I'm not sure what you mean with "more efficient than memcpy". If you mean more efficient as in producing better code: Have you actually checked what comes out of the compiler if you do this? If you mean more elegant from a coding style point of view: The language provides the means, it is called "union". -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34295