Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!uw-june!pardo From: pardo@june.cs.washington.edu (David Keppel) Newsgroups: comp.lang.c Subject: More prototype questions... Message-ID: <6144@june.cs.washington.edu> Date: 20 Oct 88 16:49:40 GMT Reply-To: pardo@uw-june.UUCP (David Keppel) Organization: U of Washington, Computer Science, Seattle Lines: 28 I hate to hash this out again, but I have a dpANS-related questions about the difference between a pointer to an object and the name of an array of objects. When I run gcc with all the dpANS flags (-ansi -pedantic), it complains about functions that are prototyped as f (char s[]); and used as static char *x = "honk"; foo (x); I think I understand the difference between the array name and a ponter to objects in the array: the array name is the address of an object that is the size of the entire array, while a pointer to the first element of the same array is a pointer to an object the size of an *element* in the array. Perhaps I'm answering my own question here, but I don't see why this distiction causes problems for the prototypes. Can somebody please explain? ;-D on ( Thanks again, ladies and gentlemen, for your patients ) Pardo -- pardo@cs.washington.edu {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo