Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: pointers to arrays and the '&' operator Message-ID: <1030@auspex.UUCP> Date: 17 Feb 89 19:07:14 GMT References: <3927@ingr.com> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 19 >Since I am allowed to declare something that has type "pointer to an array >of...", then why am I not permitted to apply the '&' (address of) operator >directly to an array?? ... Do more recent versions of the standard >address (no pun intended) this concern?? All the versions of the dpANS that I've seen allow you to apply "&" to an array; I would be extremely surprised if the latest version of the pANS didn't permit you to do so as well. The reason why you're not generally permitted to do this on, say, UNIX systems is that many C compilers on UNIX systems don't implement that part of the language in the dpANS (e.g. the Ritchie compiler, or PCC). >P.S. The same argument can be said for pointers to functions and &E where > E is the name of a function... The May 19, 1988 dpANS indicates that "function designators" don't get turned into "pointer to function" expressions when used as the operand of "sizeof" or unary "&", so that version (and presumably later versions) of the (draft) proposed standard allows you to do &E as well.