[Bug c++/80138] spurious warning: assuming signed overflow does not occur when ...

2017-03-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80138 --- Comment #4 from Richard Biener --- 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 now

[Bug c++/80138] spurious warning: assuming signed overflow does not occur when ...

2017-03-22 Thread julienpommier at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80138 --- Comment #3 from Julien Pommier --- I agree spurious was not the right wording, sorry for that. However it took me quite a lot of time to understand and to find out which function was responsible for the warning in my original code, which was

[Bug c++/80138] spurious warning: assuming signed overflow does not occur when ...

2017-03-21 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80138 --- Comment #2 from Marc Glisse --- It isn't spurious. Of little use and unwanted, yes. It is telling you that the compiler assumed that your code was correct, that can hardly be wrong...

[Bug c++/80138] spurious warning: assuming signed overflow does not occur when ...

2017-03-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80138 --- Comment #1 from Andrew Pinski --- So the reason why it disappears with: "(w >= y) && (w < y+h)" is that GCC has only one bit to say if we should not warn again on an expression and using () causes that bit to be set :). GCC needs more bits