Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.lang.c
Subject: Addresses of Arrays
Message-ID: <9826@mimsy.UUCP>
Date: 17 Dec 87 00:14:45 GMT
References: <126@citcom.UUCP> <2550034@hpisod2.HP.COM> <1854@haddock.ISC.COM> <3179@umn-cs.cs.umn.edu>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 15

In article <3179@umn-cs.cs.umn.edu> randy@umn-cs.cs.umn.edu (Randy
Orrison) writes:
[given that &array becomes legal]
>   With declarations (on the stack, contiguous in memory...)
>	char s[16];
>	char t[16];
>
>	Is it true that:  *(&s + 1) == t (assuming array comparisons)?

No, because there is no guarantee as to how stack allocation works.
The obvious possible pairs are &s+1==&t and &s-1==&t, but compilers
are allowed to do almost anything.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris