http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45831
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-09-29 14:59:22 UTC --- (In reply to comment #4) > In case you are missing the point, most non-bug posters compile on their > target > machine. In C/C++, shifting by a negative number is undefined. So what that means is that it could produce a different values on different targets and at different times (including at different optimization level). I think we warn with either -Wextra or -Wall when we see a negative shifting count.