From: utzoo!decvax!ittvax!sii!wje
Newsgroups: net.unix-wizards
Title: Re: C question
Article-I.D.: sii.129
Posted: Tue Jun 22 09:16:01 1982
Received: Sun Jun 27 01:23:54 1982
References: sri-unix.1809

b
We have several Onyx systems here, and it is true that '&foo' is not
allowed for function or array names. This is, however, not a bug.
Onyx uses the PCC compiler, which will not allow this construct, and
rightly so. Reference to the C book will show that an unsubscripted
array reference is equivalent to a pointer to that array. Therefore,
using '&foo' actually implies double indirection! For example,
	char foo[2];

	foo	=>	&(foo[0])
	&foo	=>	&(&(foo[0]))

The actual bug is in the v7 cc, which does not report this as an
error, but ignores it.

The function name issue is a little more complex. Just like arrays,
a function name BY ITSELF has no value; it is only a way to indirectly
compute other values. Therefore, analogous to the interpretation of
an array name by itself, which is the address of the data, a function
name by itself is taken to be the address of the 'data', or function
body. Note that neither array or function names may be used as LVALUES.

	-Bill Ezell
	 Software Innovations, Inc.
	 decvax!sii!wje
	 ittvax!sii!wje
	 harpo!sii!wje