[Bug c++/55885] Modulo operator crashes for int and long variables if they have minimal value

2013-01-06 Thread kwieder at polytechnic dot edu.na
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55885 --- Comment #4 from kwieder at polytechnic dot edu.na 2013-01-06 12:44:42 UTC --- Hi Jonathan, According to the the standard C++ implementation (a % -b) <==> (a % b), therefore (INT_MIN % -1) <==> (INT_MIN %1) == 0

[Bug c++/55885] Modulo operator crashes for int and long variables if they have minimal value

2013-01-06 Thread kwieder at polytechnic dot edu.na
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55885 --- Comment #2 from kwieder at polytechnic dot edu.na 2013-01-06 12:14:16 UTC --- Thanks for the quick response. Why is INT_MIN % -1 ok and why is int b = -1; INT_MIN % b not ok. I"m well awa