no noalias not negligible

Dik T. Winter dik at cwi.nl
Tue May 24 10:45:53 AEST 1988


In article <1988May21.030207.25063 at light.uucp> bvs at light.UUCP (Bakul Shah) writes:
 >In article <54080 at sun.uucp> dgh%dgh at Sun.COM (David Hough) writes:
 >>Anyway there is no portable way in draft ANSI C to say "this pointers are
 >>guaranteed to have no aliases".
 >
 >How about adding a test before the for loop?  Something like:
 >#define overlap(x,y,n)    (!(x + n <= y || y + n <= x))
 >	if (overlap(dx, dy, n))
 >		return complain("overlapping arrays\n");
 >
Note however that in many cases it is much more difficult to ascertain
overlap (i.e. 2 columns of matrices).  And there are cases where it
is just as difficult as the operations themselves.
-- 
dik t. winter, cwi, amsterdam, nederland
INTERNET   : dik at cwi.nl
BITNET/EARN: dik at mcvax



More information about the Comp.lang.c mailing list