Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.std.c Subject: Re: Bounds checks. (was variable-length struct hack) Message-ID: <1989Dec12.190347.13521@twwells.com> Date: 12 Dec 89 19:03:47 GMT References: <448@longway.TIC.COM> <450@longway.TIC.COM> <15364@haddock.ima.isc.com> <809@prles2.UUCP> <1989Dec8.161820.24804@jarvis.csri.toronto.edu> <1989Dec11.181631.3864@jarvis.csri.toronto.edu> Organization: None, Ft. Lauderdale, FL Lines: 12 In article <1989Dec11.181631.3864@jarvis.csri.toronto.edu> norvell@csri.toronto.edu (Theo Norvell) writes: : int A[N], *p; : for(p=A; p < A+N ; ++p ) { ... } /* Good */ : for(p=A; p < &A[N] ; ++p ) { ... } /* Undefined! */ The two are exactly the same: &A[N] = &(*(A + N)) = A + N --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com