Messages in this thread | | | Date | Thu, 19 Nov 1998 10:11:56 +1030 (CST) | From | Alan Modra <> | Subject | Re: have a look at this proggie, please. |
| |
On Wed, 18 Nov 1998, Tigran Aivazian wrote:
> #include <values.h> > #include <stdio.h> > > int main(int argc, char *argv[]) > { > int a = -MAXINT-1, b = -1, c = a*b; > > fprintf(stderr, "%d * %d = %d\n", a, b, c ); > if (b) { > c = a / b; > fprintf(stderr, "%d/%d = %d\n", a, b, c ); > } > return 0; > }
Why the surprise? You've generated an exception #0, which Intel called "divide by zero" in early IA processor manuals, but now call "divide error". It is raised by any divide where the result overflows.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |