http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52904
--- Comment #6 from eggert at gnu dot org --- > That diagnostic seems right, according to the documentation of > -Wstrict-overflow. The diagnostic is "right" only in the sense that it is correctly reporting that GCC does not deduce that signed overflow cannot possibly occur in this function. It is not "right" in the common sense that a programmer would ordinarily want, i.e., that the program may have a bug because signed overflow might lead to undefined behavior. (Surely the diagnostic is supposed to be for the benefit of programmers trying to find potential bugs in their programs, not for the benefit of GCC maintainers trying to explain how GCC works internally. :-)