[Bug tree-optimization/66264] [untaken optimization] switch & enums without default-case
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 28 06:12:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66264
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
enum Foo { A,B,C,D };
int square(Foo f) {
switch (f) {
case A: return 33;
case B: return 24;
case C: return 857;
case D: return 980;
//default: return 0;
};
//return 0; // uncomment this to get the fast code
}
Just in case the goo.gl link goes away.
More information about the Gcc-bugs
mailing list