[Bug c/107846] [13 Regression] error: result of '8000 << 8' requires 22 bits to represent, but 'short int' only has 16 bits

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 23 19:12:02 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107846

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#0  warning_at (location=0, opt=765, gmsgid=0x30ecaf8 "result of %qE requires
%u bits to represent, but %qT only has %u bits") at
/home/apinski/src/upstream-gcc-git/gcc/gcc/diagnostic.cc:1845
#1  0x0000000000d3a2e2 in maybe_warn_shift_overflow (loc=0, op0=0x7ffff6e949c0,
op1=0x7ffff6e94960) at
/home/apinski/src/upstream-gcc-git/gcc/gcc/c-family/c-warn.cc:2645
#2  0x0000000000c62e14 in c_fully_fold_internal (expr=0x7ffff6e84cf8,
in_init=false, maybe_const_operands=0x7fffffffce5b,
maybe_const_itself=0x7fffffffce5a, for_int_const=false, lval=false) at
/home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:429
#3  0x0000000000c62358 in c_fully_fold_internal (expr=0x7ffff6e84d20,
in_init=false, maybe_const_operands=0x7fffffffce5b,
maybe_const_itself=0x7fffffffce5a, for_int_const=false, lval=false) at
/home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:354
#4  0x0000000000c63089 in c_fully_fold_internal (expr=0x7ffff6e96420,
in_init=false, maybe_const_operands=0x7fffffffce5b,
maybe_const_itself=0x7fffffffce5a, for_int_const=false, lval=false) at
/home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:473
#5  0x0000000000c614ab in c_fully_fold (expr=0x7ffff6e96420, in_init=false,
maybe_const=0x7fffffffce5b, lval=false) at
/home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:125


More information about the Gcc-bugs mailing list