http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53524
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-30 01:53:24 UTC --- >Further, the warning doesn't get suppressed even under -Wno-enum-compare. That is because it is not a compare; it is a conditional expression. Also I think the warning is correct but not for a weird reason. The type of enum values are not finalized until after the enum is closed.