In C99, if you have the following function prototypes:

  void funcX();
  void funcY(void);

funcX declares a function with no parameter specification, and funcY
declares a function with no parameters. Hence the funcX prototype
could be considered 'wrong', or at least undesirable, because it is
incomplete. (If your code calls funcX(), PC/Flexe-lint will complain
that there is
no prototype.)

However, what if you miss out the void in the function definition?
That is, what is the difference (if any) between

  int main() { /* do stuff */ return 0; }

and

  int main(void) { /* do stuff */ return 0; }

?

Cheers
John

Reply via email to