divide overflow

Alexandre Oliva oliva@dcc.unicamp.br
Mon May 31 21:06:00 GMT 1999

On May 20, 1999, Ulrich Drepper <drepper@cygnus.com> wrote:

>> long int A, B, C;
>> A = INT_MIN;
>> B = -1;
>> C = A/B;

> This is known and the result is correct.

Is crashing the program correct?  I thought result was just
unspecified, not undefined.

Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
*** E-mail about software projects will be forwarded to mailing lists

More information about the Gcc-bugs mailing list