------- Comment #3 from jima at cadence dot com 2007-03-21 01:32 ------- Can you point me to a description of the C++ aliasing rules? Is the memcpy() workaround specific to GCC, or is memcpy part of the standard with special rules regarding aliasing? (I ask because our code base has to work on a half-dozen platforms, many of which don't use GCC).
Will GCC optimize the memcpy() and intermediate variable ("n") away? With gcc323 this code comes out to about 6 instructions, so even 1 or 2 more would be a large percentage hit... Thanks for your help! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31289