about no-returned main
Alexandre Oliva
aoliva@redhat.com
Tue Apr 10 21:14:00 GMT 2001
On Apr 11, 2001, "liujg" <liu.jianguo@prosperity.com.cn> wrote:
> I certainly implement my main function as: void main(),but gcc
> report me an error: `return' with no value, in function returning
> non-void.Though I can fit it with changing the prototype of main,but
> I guess there is some interest reason,Can you tell me what it is?
The C and C++ Standards require main() to return int.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-help
mailing list