Paolo Carlini writes:
 > Roberto Bagnara wrote:
 > 
 > > No, Paolo: the result of INT_MIN % -1 is zero, according to the standard.
 > > There is no overflow whatsoever involved.  The overflow that you
 > > see is simply an artifact of GCC that produces assembly code that
 > > does not implement remainder expressions correctly.
 > 
 > Ok, I believe you. However, isn't true that, in general, because the 
 > sign of the result is implementation defined,

The sign of the result of % is no longer (since C99) implementation-
defined.

Andrew.

Reply via email to