[Bug c++/27241] Bad code reordering when using an enum as a bitfield

2006-04-21 Thread danfuzz at milk dot com
--- Comment #3 from danfuzz at milk dot com 2006-04-21 23:11 --- Wow, that was quick. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27241

[Bug c++/27241] Bad code reordering when using an enum as a bitfield

2006-04-21 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-21 23:06 --- You are violating C/C++ aliasing rules: Length(const Length &o) { *((unsigned int *)this) = *((unsigned int *)&o); } Use either -fno-strict-aliasing or use memcpy but even then that might not work as this is a non

[Bug c++/27241] Bad code reordering when using an enum as a bitfield

2006-04-21 Thread danfuzz at milk dot com
--- Comment #1 from danfuzz at milk dot com 2006-04-21 23:04 --- Created an attachment (id=11315) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11315&action=view) Source file that demonstrates the bug Compile this file as indicated in the original bug report, and then examine the