Topic: return 0;" at end of "int main()
Author: kevlin@wslint.demon.co.uk (Kevlin Henney)
Date: Thu, 2 Jun 1994 12:06:13 +0000 Raw View
In article <CqIq20.Gn0@ucc.su.OZ.AU>
maxtal@physics.su.OZ.AU "John Max Skaller" writes:
>In article <CLINE.94May27152436@cheetah.clarkson.edu>
> cline@sun.soe.clarkson.edu (Marshall Cline) writes:
>>
>>I understand that the Committee was considering fall off the end of
>>"int main()" to be the same as "return 0;". i.e., as if there was
>>an implicit "return 0;" at the end of "int main()".
>>
>>Has this been approved?
>
> Yes.
Ugh! What a dreadful proposal! More exceptions in the language, when it
was previously quite clear that _any_ value returning functions that failed
to return a value was illegal. It is bad enough that people don't explicitly
declare a return value for main.
Anyway, shouldn't it default to "return EXIT_SUCCESS"? :-)
--
Kevlin Henney
repeat 3 echo there\'s no place like ~
Author: cline@sun.soe.clarkson.edu (Marshall Cline)
Date: Fri, 27 May 1994 20:24:36 GMT Raw View
I understand that the Committee was considering fall off the end of
"int main()" to be the same as "return 0;". i.e., as if there was
an implicit "return 0;" at the end of "int main()".
Has this been approved?
Thanks.
--
Marshall Cline
--
Marshall P. Cline, Ph.D. / Paradigm Shift Inc / PO Box 5108 / Potsdam NY 13676
cline@parashift.com / 315-353-6100 / FAX: 315-353-6110
Author: jason@cygnus.com (Jason Merrill)
Date: Sat, 28 May 1994 02:14:43 GMT Raw View
>>>>> Marshall Cline <cline@sun.soe.clarkson.edu> writes:
> I understand that the Committee was considering fall off the end of
> "int main()" to be the same as "return 0;". i.e., as if there was
> an implicit "return 0;" at the end of "int main()".
> Has this been approved?
Yes.
Author: maxtal@physics.su.OZ.AU (John Max Skaller)
Date: Sat, 28 May 1994 15:08:23 GMT Raw View
In article <CLINE.94May27152436@cheetah.clarkson.edu> cline@sun.soe.clarkson.edu (Marshall Cline) writes:
>
>I understand that the Committee was considering fall off the end of
>"int main()" to be the same as "return 0;". i.e., as if there was
>an implicit "return 0;" at the end of "int main()".
>
>Has this been approved?
Yes.
--
JOHN (MAX) SKALLER, INTERNET:maxtal@suphys.physics.su.oz.au
Maxtal Pty Ltd, CSERVE:10236.1703
6 MacKay St ASHFIELD, Mem: SA IT/9/22,SC22/WG21
NSW 2131, AUSTRALIA