From owner-freebsd-hackers Sat May 31 02:10:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA14505 for hackers-outgoing; Sat, 31 May 1997 02:10:52 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA14500 for ; Sat, 31 May 1997 02:10:49 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id TAA08013; Sat, 31 May 1997 19:05:01 +1000 Date: Sat, 31 May 1997 19:05:01 +1000 From: Bruce Evans Message-Id: <199705310905.TAA08013@godzilla.zeta.org.au> To: davem@jenolan.rutgers.edu, joerg_wunsch@uriah.heep.sax.de Subject: Re: bcc vs cc/gcc (float) Cc: hackers@FreeBSD.ORG, un_x@anchorage.net Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > The only valid declarations of main() are: > > int main(int, char **) > int main(void) > >I thought ANSI C allowed > >int main(int argc, char **argv, char **envp) > >I could be mistaken... I thought that it allowed the implementation to allow that. I was mistaken. POSIX.1 specifies that exec shall use the 2-arg form. I think POSIX is an extension of ANSI here, so the 0-arg form is still allowed, but POSIX doesn't seem to say this explicitly. Bruce