Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!psivax!uunet!ingr!crossgl From: crossgl@ingr.com (Gordon Cross) Newsgroups: comp.lang.c Subject: pointers to arrays and the '&' operator Message-ID: <3927@ingr.com> Date: 14 Feb 89 15:00:27 GMT Organization: Intergraph Corp. Huntsville, Al Lines: 23 Allright, the recent discussion regarding pointers to arrays in C reminds me of something that I consider to be a major deficiency of the language. I could not find any explicit reference to this in the standard (admittedly I have an old copy) but Harbison and Steele do mention that it is not legal. 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?? Yes, before you say it, I know that the array name is converted to a pointer in expressions but I also know that the usual conversions do not apply to the '&' operator. It seems perfectly reasonable to expect that the expression &E where E is an array should result in a constant of type "pointer to array"!! What thoughts do the rest of you have on this??? Do more recent versions of the standard address (no pun intended) this concern?? P.S. The same argument can be said for pointers to functions and &E where E is the name of a function... -- Gordon Cross UUCP: uunet!ingr!crossgl "all opinions are 111 Westminister Way INTERNET: crossgl@ingr.com mine and not those Madison, AL 35758 MA BELL: (205) 772-7842 of my employer."