Date: Wed, 04 Sep 1996 08:50:27 -0600 From: Warner Losh <imp@village.org> To: "Daniel O'Callaghan" <danny@panda.hilink.com.au> Cc: Zach Heilig <zach@blizzard.gaffaneys.com>, Paul DuBois <dubois@primate.wisc.edu>, "Kevin P. Neal" <kpneal@pobox.com>, hackers@FreeBSD.org Subject: Re: void main Message-ID: <199609041450.IAA02679@rover.village.org> In-Reply-To: Your message of Wed, 04 Sep 1996 19:33:09 %2B1000
next in thread | raw e-mail | index | archive | help
: 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). Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609041450.IAA02679>