Namespaces & main()

Jason Merrill jason@cygnus.com
Mon Oct 19 02:16:00 GMT 1998


>>>>> Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:

 > Jason Merrill <jason@cygnus.com> writes:
 > |> >>>>> Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> writes:
 > |> 
 > |>  > |> This part is correct.  The global "main" is explicitly defined 
 > |>  > |> in the C++ standard to return 0 if no return value is given.
 > |> 
 > |>  > Unfortunately g++ doesn't implement that yet.
 > |> 
 > |> Huh?  Sure it does.

 > The last time i checked (with the 981005 snapshot) it didn't.  Maybe that
 > changed in the mean time.

Just to be clear, I'm talking about falling off the end of ::main being
equivalent to a 'return 0;'.  g++ has supported this since before I started
working on it in 1993.

Jason



More information about the Gcc mailing list