From owner-freebsd-hackers Wed Sep 4 03:20:54 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA05117 for hackers-outgoing; Wed, 4 Sep 1996 03:20:54 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA05112 for ; Wed, 4 Sep 1996 03:20:48 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id UAA28500; Wed, 4 Sep 1996 20:13:39 +1000 Date: Wed, 4 Sep 1996 20:13:39 +1000 From: Bruce Evans Message-Id: <199609041013.UAA28500@godzilla.zeta.org.au> To: dubois@primate.wisc.edu, zach@blizzard.gaffaneys.com Subject: Re: void main Cc: hackers@freebsd.org, kpneal@pobox.com Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> Um, so what exactly is wrong with void main, other than that you don't >> happen to like it? > >Strictly speaking, there are exactly two correct versions of main(): > >int main(void); > >and > >int main(int argc, char *argv[]); Actually, there are an infinite number. In a freestanding environment, main() is an ordinary function. BSD4.4Lite uses: void main(void *framep); >It is also questionable to gratuitously use undefined behavior (wrt >the ISO C standard) when a 100% correct version costs nothing. True. Bruce