Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site dg_rtp.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!mcnc!rti-sel!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: net.lang.c Subject: Re: Address of array Message-ID: <211@dg_rtp.UUCP> Date: Sun, 9-Mar-86 00:02:13 EST Article-I.D.: dg_rtp.211 Posted: Sun Mar 9 00:02:13 1986 Date-Received: Tue, 11-Mar-86 01:39:49 EST References: <750@abic.UUCP> Lines: 18 > I have noticed that different compilers treat the & operator differently > when it is applied to arrays. In particular, the UNIX compiler I have > been using warns against it. K&R explicitly deny its legality. > However, the operation seems to me to be perfectly > reasonable when the desired result is a pointer to the array rather > than a pointer to the first element of the array. I agree that C's treatment of array/function/struct addresses is inconsistant, confusing, and limiting. In essence a small notational convenience was traded for a large consistancy headache. I think the tradeoff was wrong, but I'm not sure that your proposal would clarify things. I'd hesitate to evaluate textually and syntactically identical constructs differently based on whether an lvalue or an rvalue is needed in the current context. This would pile more confusion on an already dismal situation. -- Wayne Throop at Data General, RTP, NC !mcnc!rti-sel!dg_rtp!throopw