www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/10/19:34:09

From: Radical DOT NetSurfer AT delorie DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: compiler doesn't catch missing semicolon after struct
Date: Wed, 10 Oct 2001 19:11:45 -0400
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <l9l9stkoh0gddd9fph3epmnu56479mr3kf@4ax.com>
References: <c3114d1f DOT 0110091227 DOT 17603d3b AT posting DOT google DOT com> <3BC35FB1 DOT FF1958C AT earthlink DOT net> <1hu8stke235jh08aogbbc44rojtm115j23 AT 4ax DOT com> <9q1vdo$34r$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
X-Complaints-To: newsabuse AT supernews DOT com
Lines: 33
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

(for sake of serious discussion you understand)

Just what the HE** other choices would you want for
main other than "int"  or  "void" ??????

Why/How make it more complicated? For what reason
is there to say if it is NOT explicitly given, its an "int",
otherwise, you must declare "void" (icky, I know).

I can see it now:

char *main(...argc, argv) {  ... }

)sorry about getting those backwards; you know how the mind warps(

On 10 Oct 2001 17:10:16 GMT, Hans-Bernhard Broeker
<broeker AT physik DOT rwth-aachen DOT de> wrote:

>Radical wrote:
>> defining main simply:
>
>> main(...argv,...argc)
>
>> should indeed DEFAULT to the int main(...argv,...argc) construct,
>
>It shouldn't. Not since ANSI C99 was ratified, which disallowed
>implicit function return types, among other things.
>
>> but doesn't (older compilers would have no problemwith this).
>
>It does, unless you call for C99 compatibility. But it generates a
>(perfectly deserved) warning.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019