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





Neither INT_MIN % -1 nor INT_MIN %1 require a division, therefore there should

be no undefined behaviour in the first place.



Regards, 

Klaus







On Jan 6, 2013, at 2:26 PM, redi at gcc dot gnu.org wrote:



--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-01-06

12:26:13 UTC ---



Are you asking why undefined behaviour doesn't have consistent results?

Reply via email to