This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/19978] overflow in expression of constants should not cause multiple warnings



------- Comment #8 from schlie at comcast dot net  2007-01-06 15:04 -------
It seems that an overflow warning should be generated if an overflowed value
is utilized or results from an expression evaluation between sequence ponts?
Thereby:

x = INT_MAX + 2 - 2 ; // warning x may overflow.

z = (y = x +1, y - 2)  ; // warning y may overflow, warning z may overflow.

if (z < INT_MAX) {<something>} // warning if may overflow.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]