From mboxrd@z Thu Jan 1 00:00:00 1970 From: n8tm@aol.comnojunk (Tim Prince) To: help-gcc@gnu.org Subject: Re: Newbie gcc question Date: Thu, 30 Sep 1999 23:56:00 -0000 Message-ID: <19990912184242.01175.00001288@ng-bg1.aol.com> References: X-SW-Source: 1999-09n/msg00142.html Message-ID: <19990930235600.gYHm0V-E9Eh1WUyPTt-cm0H2xRxxuz_OIjX87n86WTQ@z> >why gcc doesn't work with 'void' but works with 'int' >and ' ' ? There must be something in the comp.lang.c FAQ on this; this is one of the great gulfs between the Microsoft camp and the rest of the C world. Most environments where C programs run expect main() to return an int status code, and getting this wrong is just as bad as it would be inside your program. C++ gets even more wrought up about this; C has some historical loopholes where failure to declare is made to default to int, of which this is one. Speaking as a Fortran programmer who has to work in environments which expect programs to run like C, and has a great familiarity with undeclared things. Tim Prince tprince@computer.org