www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/01/11:06:01

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Reading the command line
Date: Wed, 29 Oct 1997 19:26:22 -0800
Organization: Alcyone Systems
Lines: 21
Message-ID: <3457FE5E.431DD5F8@alcyone.com>
References: <3 DOT 0 DOT 16 DOT 19971029215033 DOT 35b7c09c AT hem1 DOT passagen DOT se>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Peter Palotas wrote:

> If this is so, why doesn't the compiler generate an error for
> declaring
> main() as 'void main()'?

Are you seriously suggesting that anything you can compile with "the
compiler" (never minding that people use different compilers) without it
emitting warnings or errors is ANSI C compliant?  Think carefully before
answering.

main must return int.  There is no quibbling about it; it is clearly
specified in ANSI C section 5.1.2.2.1.

-- 
         Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                       Alcyone Systems / http://www.alcyone.com/max/
  San Jose, California, United States / icbm://+37.20.07/-121.53.38
                                     \
  "After each war there is a little / less democracy to save."
                                   / Brooks Atkinson

- Raw text -


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