Path: utzoo!attcan!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c Subject: Re: main() arguments, was Re: typedef-ing an array Message-ID: <302@taumet.com> Date: 4 Jul 90 16:56:30 GMT References: <78627@srcsip.UUCP> <78633@srcsip.UUCP> <25247@mimsy.umd.edu> <12433@sun.udel.edu> <4238@jato.Jpl.Nasa.Gov> <25273@mimsy.umd.edu> <4241@jato.Jpl.Nasa.Gov> <8584@jpl-devvax.JPL.NASA.GOV> Reply-To: steve@taumet.UUCP (Stephen Clamage) Organization: Taumetric Corporation, San Diego Lines: 16 In article <4241@jato.Jpl.Nasa.Gov> kaleb@mars.UUCP (Kaleb Keithley) writes: >In article <25273@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: >-to write a portable program, you must not use this invisible third argument. > >Can you quote a reference to this assertion? ANSI C standard, section 2.1.2.2, says that main may be declared with zero or two arguments. Period. If you write main() with one or three or more arguments, it does not conform to the standard, and any conforming compiler is free to reject it as an error. A conforming compiler MAY allow additional arguments as an extension, but need not. -- Steve Clamage, TauMetric Corp, steve@taumet.com