[Bug c/47732] counter decremented to zero not detected when other counter overflows

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 14 18:27:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47732

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-02-14 18:22:17 UTC ---
"lVeryHighCounter is incremented (and overflows) from 0x7FFFFFFF to
0x80000000."

And overflow is undefined in C/C++ so you are invoking undefined behavior here.



More information about the Gcc-bugs mailing list