Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lanl!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: pointers to arrays and the '&' operator Message-ID: <9659@smoke.BRL.MIL> Date: 16 Feb 89 17:19:13 GMT References: <3927@ingr.com> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17 In article <3927@ingr.com> crossgl@ingr.com (Gordon Cross) writes: >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. It is actually the fact that arrays are not first-class objects in C that is the deficiency. This cannot be fully remedied without invalidating large amounts of existing correct code. >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?? In ANSI C, you are allowed to do so. Many existing (PCC-based) compilers permit &array but ignore the &. That is not the ANSI C behavior, though. For maximal portability you should avoid using &array for a few years.