http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55095



--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2012-10-28 17:58:55 UTC ---

The constant folder (fold-const.c:int_const_binop_1) would seem to be the 

place where overflow information would most readily be available for this: 

as I understand it, it's specifically about constants, rather than the 

generic issue that almost any left shift with nonconstant operands might 

overflow.  If diagnosing there, you'd want to pass down a location a few 

levels from fold_binary_loc (so changing lots of calls to const_binop to 

pass a location).



(In any case, double-int will need a new interface to report whether shift 

overflow has occurred.)

Reply via email to