bfin c++ problem

Oliver Kullmann o.kullmann@swansea.ac.uk
Thu Jul 21 11:12:00 GMT 2016


On Thu, Jul 21, 2016 at 11:26:42AM +0100, Jonathan Wakely wrote:
> On 21 July 2016 at 04:05, Oliver Kullmann wrote:
> > Hello,
> >
> > a C++ compiler is not required to recognise "main(void)":
> 
> That's incorrect.
> 
> Although I consider (void) parameter lists to be an abomination in
> C++, "int main(void)" has exactly the same type as "int main()" which
> is one of the types that all implementations must support.

Where did you get this?
The Standard Subsection 3.6.1 says

  All implementations shall allow both of the following definitions of
  main:

    int main()
and
    int main(int argc char* argv[])

That's it!

Oliver



More information about the Gcc-help mailing list