Date: Wed, 4 Sep 96 19:31:45 +0300 From: "Daniel C. Sobral" <e8917523@linf.unb.br@gns.com.br> To: hackers@freefall.freebsd.org Subject: Re: hackers-digest V1 #1437 Message-ID: <9609041631.AA0156@DANIEL.sobral> In-Reply-To: <199609041451.HAA15091@freefall.freebsd.org> from "owner-hackers-digest@freefall.freebsd.org" at Sep 4 96 7:51 am
index | next in thread | previous in thread | raw e-mail
> : Well, if you do
> : int main(void) { printf("Hello world\n"); }
> :
> : and compile with gcc -Wall, gcc will complain about reaching the end of a
> : non-void function. Declaring main() to be void will remove that warning.
> : I use void main(void){...} a lot.
>
> A simple return 0; at the end would fix the problem. Otherwise your
> program has a bug in that it will return a random value to the shell
> for its exit status (generally 11).
Just doc it as a feature... :-)
--
Daniel C. Sobral (8-DCS)
dcs@gns.com.br
e8917523@linf.unb.br
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9609041631.AA0156>
