------- Comment #5 from manu at gcc dot gnu dot org 2008-01-18 19:02 -------
(In reply to comment #4)
> I think then -Wall shouldn't enable -Wstrict-overflow at all. Because current
> situation is counter intuitive.
>
This a bug. A quick fix is:
Index: gcc/c-opts.c
===================================================================
--- gcc/c-opts.c (revision 131530)
+++ gcc/c-opts.c (working copy)
@@ -403,7 +403,8 @@
warn_switch = value;
set_Wstrict_aliasing (value);
warn_address = value;
- warn_strict_overflow = value;
+ if (warn_strict_overflow < 2)
+ warn_strict_overflow = value;
warn_array_bounds = value;
/* Only warn about unknown pragmas that are not in system
As you can see above, the same happens for other options, e.g.,
-Wstrict-aliasing=2 -Wall.
My proposal to fix this is here:
http://gcc.gnu.org/ml/gcc/2007-05/msg00719.html
http://gcc.gnu.org/ml/gcc/2007-05/msg00724.html
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-01-18 19:02:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32102