Re: Newbie Question about main

From: Josh Sebastian (curien_at_cox.net)
Date: 01/14/04


Date: Wed, 14 Jan 2004 17:44:40 -0500

On Wed, 14 Jan 2004 20:29:27 +0000, Leor Zolman wrote:

> Here's how
> the C Standard defines the term "function prototype" (Section 6.2.1,
> paragraph 2):
>
> A function prototype is a declaration of a function
> that declares the types of its parameters.
>
> Something with an empty parameter list most certainly does _not_
> declare the types of its parameters.

So, is

  int foo(int a ...);

not a prototype?

Josh



Relevant Pages

  • Re: so forth is useless except for limited mem environments?
    ... Stack diagrams for my Forth code are always a part of the source code even ... is still supported as well as the newer "ANSI" prototype syntax. ... namely integer types "smaller" than int or float, ... you do declare or define anything you do not ...
    (comp.lang.forth)
  • Prototype for main()
    ... prototype for mainwas declared. ... extern int main; ... must declare your own? ... Is there any reason why the gcc source code and other GNU utility ...
    (comp.lang.c)
  • Re: Prototype for main()
    ... prototype for mainwas declared. ... extern int main (int, const char **); ... must declare your own? ...
    (comp.lang.c)
  • Re: function prototypes
    ... a prototype" - then yes, there can only be one function definition). ... You can _declare_ a function multiple times with different prototypes, ... as the example given was "int main" and "int main(int argc, ...
    (comp.lang.c)
  • Re: Prototype for main()
    ... prototype for mainwas declared. ... extern int main; ... I also noticed that several GNU utilities ... must declare your own? ...
    (comp.lang.c)