Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 1996 20:13:39 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        dubois@primate.wisc.edu, zach@blizzard.gaffaneys.com
Cc:        hackers@freebsd.org, kpneal@pobox.com
Subject:   Re: void main
Message-ID:  <199609041013.UAA28500@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609041013.UAA28500>