Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!thetone!swilson From: swilson%thetone@Sun.COM (Scott Wilson) Newsgroups: comp.lang.c Subject: Re: array[-1] -- permitted? Message-ID: <69575@sun.uucp> Date: 22 Sep 88 16:15:10 GMT References: <867@osupyr.mast.ohio-state.edu> <3200@geac.UUCP> <1430@ficc.uu.net> <1988Sep19.164701.11136@ateng.uucp> <2583@ingr.UUCP> <1237@imagine.PAWL.RPI.EDU> Sender: news@sun.uucp Reply-To: swilson@sun.UUCP (Scott Wilson) Organization: Sun Microsystems, Mountain View Lines: 18 I'm not quite sure what is being discussed. I assume the standard says that the -1'th element on an array is not guaranteed to be accessible, not that negative array indices are disallowed. For example, this is legal is it not: int array[10], *ip = array; ip++; foo(ip[-1]); I assume when yacc uses array index of -1 it is doing something similar. -- Scott Wilson arpa: swilson@sun.com Sun Microsystems uucp: ...!sun!swilson Mt. View, CA