http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48418
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-09 14:51:17 UTC --- Author: jakub Date: Wed Jan 9 14:51:09 2013 New Revision: 195051 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195051 Log: PR c/48418 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is either negative or bigger or equal to type precision of the first operand. * typeck.c (cp_build_binary_op): For LSHIFT_EXPR and RSHIFT_EXPR, call maybe_constant_value for the negative or too big shift count warnings. * c-c++-common/pr48418.c: New test. Added: trunk/gcc/testsuite/c-c++-common/pr48418.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog