https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119984
--- Comment #6 from saul.x.robinson at durham dot ac.uk --- (In reply to Andrew Pinski from comment #5) > (In reply to saul.x.robinson from comment #4) > > I know the integer overflows. > > Does that sort of undefined behavior cause issues with the final machine > > code the compiler generates? > > Yes. In this case if you are adding 2 positive numbers together, GCC assume > they always be positive (due to undefined behavior of integer overflow) so > it will remove the and of the sign bit off because GCC assumes it will > always be 0 as it is still positive. Oh. Just encase it exist, is there a setting to make GCC assume overflows are possible as I have found them to be useful quite often?