> -----Original Message----- > From: piclist-bounces@MIT.EDU On Behalf Of John Temples > Sent: Thursday, July 22, 2010 12:37 PM > > On Thu, 22 Jul 2010, Paul Hutchinson wrote: > > > The parameter identifiers in a C function prototype are optional > > No, they aren't. A function declaration that doesn't specify the > number and types of the parameters is not a function prototype. > Something like this: > > void func(); > > void main(void) > { > func(); > } > > will correctly generate a "missing prototype" warning from some > compilers (e.g., Microchip's C18). Only identifiers are optional, the types are not optional. Your example leaves out both making it an invalid function prototype. Here's an example of a valid prototype in ANSI C without an identifier. void func(int); It gives the type and number of parameters but does not include an identifier. The C99 standard (Section 6.7.5.3 paragraph 6) says: "A parameter type list specifies the types of, and may declare identifiers for, the parameters of the function." Paul Hutch -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist