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++/80138] spurious warning: assuming signed overflow does not occur when ...


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80138

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think that including -Wstrict-overflow in -Wall is a mistake given it is a
warning that assumes you assume signed overflow wraps and then tells you the
points where the compiler assumed otherwise.

But nowadays not all (-Wall) people assume that signed overflow wraps.

Implementation-wise I'd also rather alias -fno-strict-overflow to -fwrapv...
(and remove -Wstrict-overflow entirely).

-Wstrict-overflow is _not_ warning about cases where GCC somehow computed
that signed arithmetic (might) overflow.  (that's IMHO impossible without
very many false positives)

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