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/31075] 2's complement arithmetic (LLONG_MIN-1) works differently with and without optimization



------- Comment #2 from sdirkse at gams dot com  2007-03-07 22:52 -------
Thanks for telling me about the -fwrapv flag, that's good to know - I should
have double-checked my K&R 2nd Edition before sending the bug.  But I tried
running the above example with the addition of the -fwrapv flag, and it didn't
change the behavior one bit.

Also, I tried a similar example with 32- instead of 64-bit types.  It behaved
similarly.

So, can we call this a bug now?


-- 

sdirkse at gams dot com changed:

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


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


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