From -8234300357275306753
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,a7bb6560624ae2c1
X-Google-Attributes: gidf78e5,public
From: Christopher Eltschka <celtschk@physik.tu-muenchen.de>
Subject: Re: More M$ Not Conforming points...
Date: 1999/08/26
Message-ID: <37C5571F.CE3802EE@physik.tu-muenchen.de>#1/1
X-Deja-AN: 517613804
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <7ps1sg$dev$1@nnrp1.deja.com> <7pu4es$1mv3$1@news.hal-pc.org> <7q0q07$op0$1@nnrp1.deja.com>
X-Original-Date: Thu, 26 Aug 1999 17:02:55 +0200
X-Accept-Language: German/Germany, de-DE, German, de, en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: izvestia.its.unimelb.edu.au 935705543 5663 128.250.29.17 (26 Aug 1999 22:12:23 GMT)
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAN8W7tOEDnX0m9pzZAQHx/gF/ceJQi5GEYFriNNtdsvGpv5pLZK0fNkI4 +PUYEPeRb0+9qW6TkpOacKO8ojxIQGMm =y5Ys
Mime-Version: 1.0
NNTP-Posting-Date: 26 Aug 1999 22:12:23 GMT
Newsgroups: comp.std.c++

James.Kanze@dresdner-bank.com wrote:

[...]

> Seriously, I wouldn't change it to void main unless my code was so
> riddled with Microsoft'isms that there was no chance of it ever running
> elsewhere anyway.  It's a warning, not an error ; if suppressing it is
> an issue (and I agree it should be), then IMHO piping the output of the
> compiler through sed is the easiest and the best way.  It is, at any
> case, the solution I've always used.  (Yes, including with VC++.)

Another obvious solution is to simply add "return 0;" to the
end of main. This is conforming and will satisfy VC++.
Some even consider it good style ;-)

PS: Does anyone use "return EXIT_SUCCESS;"?
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



