Another silly question

Henry Spencer henry at utzoo.uucp
Sun May 21 09:34:07 AEST 1989


In article <18560 at cup.portal.com> Tim_CDC_Roberts at cup.portal.com writes:
>I disagree with this!  I assert that EVEN if the intermediate result
>goes negative, the final value will be correct, even on segmented 
>architectures.

You are assuming that there will *be* a final value.  You may get a trap
the instant the intermediate result goes invalid, if pointer arithmetic
is being done by special pointer-arithmetic instructions.

Actually, even if you don't get a trap, pointer-arithmetic instructions
may do almost anything when presented with an invalid operand.  They don't
have to act like integer instructions.
-- 
Subversion, n:  a superset     |     Henry Spencer at U of Toronto Zoology
of a subset.    --J.J. Horning | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list