Ralf Wildenhues - Re: PATCH RFC: -Wstrict-overflow, take 2 (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Ralf Wildenhues
- To: Ian Lance Taylor
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 10 Feb 2007 13:21:47 +0100
- Subject: Re: PATCH RFC: -Wstrict-overflow, take 2
- References: <m3hctwgi1d.fsf@localhost.localdomain>
Hello Ian, all, * Ian Lance Taylor wrote on Fri, Feb 09, 2007 at 03:51:26AM CET:
Here is a new version of my -Wstrict-overflow patch. This incorporates all the comments made on the first version.
A small nit, with "pedantic user" glasses on: in the documentation
addition, it isn't totally clear that each higher warning level adds
warnings, as opposed to, say, simply outputs a different set of
warnings, unrelated to the previous lower level. In the description
of the patch, the word "additionally" makes this clear:
-Wstrict-overflow=2 additionally warns about cases where a conditional expression is folded to a constant. A typical example would be (abs (x) >= 0), which will be folded to 1 (this optimization will yield an unexpected result if x == INT_MIN).
[...] vs.
+@item -Wstrict-overflow=2 +Warn about other cases where a comparison is simplified to a constant. +For example: @code{abs (x) >= 0}. This can only be simplified when +@option{-fstrict-overflow} is in effect, because @code{abs (INT_MIN)} +overflows to @code{INT_MIN}, which is less than zero.
Either "Also, ", "Additionally, ", or alternatively change the intro:
+actually a problem. To help focus on important issues, several +warning levels are defined.
to something like this:
... several warning levels with increasing amount of warning cases
are defined. Cheers,
Ralf
- References:
- PATCH RFC: -Wstrict-overflow, take 2
* From: Ian Lance Taylor
- PATCH RFC: -Wstrict-overflow, take 2
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |