Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Another silly question
Message-ID: <1989May20.233407.4172@utzoo.uucp>
Organization: U of Toronto Zoology
References: <17812@cup.portal.com> <2336@Portia.Stanford.EDU> <25671@amdcad.AMD.COM> <1176@mcrware.UUCP> <18560@cup.portal.com>
Date: Sat, 20 May 89 23:34:07 GMT

In article <18560@cup.portal.com> Tim_CDC_Roberts@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@zoo.toronto.edu
