Hrrmmm shouldn't those lines be...

Don Lewis Don.Lewis at
Fri Sep 8 18:46:21 UTC 2000

On Sep 7,  6:44pm, Russ Allbery wrote:
} Subject: Re: Hrrmmm shouldn't those lines be...

} >    Now, I can memcpy ( array, target, size), or, I can memcpy (
} > &array, target, size ).
} >    According to my tired old K&R background, number 2 is wrong..
} > err...sloppy, in C.
} They're defined by the standard as being entirely equivalent in this
} context, and I'm pretty sure that even K&R would have treated them as
} such.

I don't think &array was legal K&R.  I just tried compiling it with
the SunOS bundled cc, and it whined:
	"std.c", line 5: warning: & before array or function: ignored

There are also some differences between &array and array:

	sizeof(*(&array)) == sizeof(array)
	sizeof(*array) == sizeof(array[0])
	array[1] != (&array)[1]

More information about the inn-workers mailing list