From: utzoo!decvax!harpo!eagle!mhtsa!ihnss!ihps3!stolaf!minn-ua!slevy
Newsgroups: net.bugs.v7
Title: Re: overflow in C
Article-I.D.: minn-ua.173
Posted: Mon May 10 17:08:05 1982
Received: Wed May 12 03:31:31 1982

I think the apparent overflow problem appears because of
the way arguments are passed to printf(), not because the
arithmetic is changing according to context.  The 57000 or whatever
will be interpreted as a long, not an int, on a PDP-11,
and so the C compiler will push two words on the stack.
Printf's arguments are misaligned, since it only expects one word there.
The  (A*B)/C  value is never being printed at all in the last printf.
(I forgot the values of A, B, C, 57000, but you know what I mean.)