Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!lll-lcc!pyramid!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.lang.c Subject: Re: Pointers and Arrays Message-ID: <6024@sun.uucp> Date: Mon, 11-Aug-86 14:17:22 EDT Article-I.D.: sun.6024 Posted: Mon Aug 11 14:17:22 1986 Date-Received: Tue, 12-Aug-86 17:25:02 EDT References: <2504@brl-smoke.ARPA> <475@dg_rtp.UUCP> <477@mcgill-vision.UUCP> Organization: Sun Microsystems, Inc. Lines: 19 > As for what they SHOULD be....a pointer to an array should be just > that; indirecting off it should result in an array. There are good > reasons this isn't done; I have yet to hear an implementation suggested > that doesn't have worse flaws than the flaw currently under discussion. I suspect the implementors of PCC would be interested in hearing those "good reasons", since PCC *does* implement the type "pointer to array", and if you dereference something of that type it does yield an array (which gets converted to a pointer into its first element, along the lines mentioned in the ANSI C draft). In fact, they had no choice *but* to implement that type, since K&R clearly indicates that "pointer to array" is a valid type (an example is given of a pointer of that type in the C Reference Manual). It is a nuisance to generate a *value* of that type to assign to a variable of that type, but that's another matter. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)