[ovs-dev] [PATCH 1/2] hash: Prevent warnings about strict aliasing rules.

Ben Pfaff blp at nicira.com
Thu Jan 21 05:29:42 UTC 2010


On Wed, Jan 20, 2010 at 02:27:26PM -0500, Jesse Gross wrote:
> Some versions of GCC complain about violations of strict aliasing
> rules due to a cast between different pointer types.  This avoids
> any aliasing by copying the value first.

It looks correct.

Does it make the generated code any worse?  Since this function is an
optimization, we should try to avoid that if we can.




More information about the dev mailing list