"John Matthews" <jm5...@...> wrote: > Paul Herring <pauljherring@> wrote: > > John Matthews <jm5678@> wrote: > > > "peternilsson42" <peternilsson42@> wrote: > > > > "John Matthews" <jm5678@> wrote: > > > > > In C99, if you have the following function prototypes: > > > > > > > > > > void funcX(); > > > > > > > > This is _not_ a prototype in C99 (or C90.) > > > > > > Peter- I was going by the C99 standard at > > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
Nitpick: That is an (outdated) draft, not the standard itself. > > > which in 6.7.5.3 16 states: > > > > > > EXAMPLE 1 The declaration > > > > > > int f(void), *fip(), (*pfi)(); > > > > > > declares a function f with no parameters returning an int, > > > a function fip with no parameter specification returning a > > > pointer to an int, and a pointer pfi to a function with no > > > parameter specification returning an int. > > > > > > What have I misunderstood (wrt. fip and pfi)? > > > > The difference between "with no parameters" and "with no > > parameter specification" > > But those were the terms I used in my original post for my > examples. Quite so and it seems you used them correctly. Nevertheless, your opening statement, which appears above, is still wrong. A function declaration "with no parameter specification" is not a prototype of a function taking no parameters. > How they different to the fip and pfi prototypes in the > standard example? Neither is a prototype. 6.2.1p2 "... (A function prototype is a declaration of a function that declares the types of its parameters.)" 6.7.5.3p14 "...The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied." -- Peter
