This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49705] -Wstrict-overflow should not diagnose unevaluated expressions
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jul 2011 16:43:00 +0000
- Subject: [Bug middle-end/49705] -Wstrict-overflow should not diagnose unevaluated expressions
- Auto-submitted: auto-generated
- References: <bug-49705-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705
--- Comment #5 from Ian Lance Taylor <ian at airs dot com> 2011-07-12 16:42:07 UTC ---
My proposed patch also fixes the larger test case. Without the patch I see
this:
strict-overflow-bug.c: In function âcheck_image_widthâ:
strict-overflow-bug.c:14:4: warning: assuming signed overflow does not occur
when assuming that (X + c) >= X is always true [-Wstrict-overflow]
With the patch I see no warning. This is compiling with -O2 -Wstrict-overflow.