http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56281
Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|DUPLICATE | --- Comment #3 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> 2013-02-11 10:38:27 UTC --- Not the same request. Bug 31178 (VRP can infer a range for b in a >> b and a << b) is about a range for the second operand b (independent from the value of the first operand, BTW). Here it is a range for the first operand and the result. This is quite different due to the asymmetry of shift operators. Concerning existing code, there was also much code assuming wrapping in case of integer overflow for +. Code needs to be fixed or should not be compiled with options like -std=c99.