[Bug c++/15330] inconsistent slicing on cast of int to enum
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Thu May 6 21:54:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-05-06 21:54 -------
No, the change was fully intentional.
Possible optimizations involve applying bitmasks. For example,
enum E { a=0x100 };
E foo ();
int bar () {
return foo() & 0x200;
}
can clearly be optimized away. If gcc isn't already doing such things,
then it will very likely do in the future.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15330
More information about the Gcc-bugs
mailing list