http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60619
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Well your option violates C promotion rules. Basically the warning is there as some folks don't understand how promotion works in C when it comes to comparing unsigned and signed integers against each other. For equals, most of the time you want bytewise comparison; that is the implicate cast does not change the bits. While your switch does change the bits.