From mboxrd@z Thu Jan 1 00:00:00 1970 From: dewar@gnat.com (Robert Dewar) To: aoliva@redhat.com, law@cygnus.com Cc: gcc@gcc.gnu.org, kenner@vlsi1.ultra.nyu.edu Subject: Re: Pathalogical divides Date: Mon, 25 Sep 2000 06:57:00 -0000 Message-id: <20000925135615.00CA234D8C@nile.gnat.com> X-SW-Source: 2000-09/msg00596.html >> This is because the division of the largest negative integer by >> negative one results in an overflow. But that is part of the *implementation* not the semantic definition <> That is talking about operations which at the *semantic* level cause integer overflow. a % (-1) is defined for all values of a and does not cause integer overflow, and furthermore in this particular case the range of possible values allowed by the standard includes only zero.