🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #25

Re: ANSI standards

#25
From: David H. Thornley
Date: Tue, 19 Dec 1995 17:20
23 lines
1510 bytes
In article <4b2me3$a8c@news.aloha.com>,  <williamt@aloha.com> wrote:
>hammond_g@drkclu.meng.ucl.ac.uk (G. Ruth Hammond) wrote:
>>
>>Using Metrowerks CodeWarrior C++ on my LC475 I declare main as void main(void)
>>and it compiles ok, but using DEC C++ on an alpha it insists on int main(void) 
>>and won't compile otherwise. ...
>
>I don't recall what the ANSI standard is, I'd suspect void main(void);...
>
It's int main(whatever), and that works in Metrowerks.  There must be
some other problem somewhere.

>All Metrowerks compilers declare __MWERKS__ so you could #ifdef on that:
>
>[conditional code deleted]

I'd rather try finding the actual problem and fixing it rather than
trying to spoof the only compiler that complains with nonstandard code.
--
David H. Thornley, known to the Wise as thornley@cs.umn.edu
Disclaimer:  These are not the opinions of the University of Minnesota,
             its Regents, faculty, staff, students, or squirrels.
Datclaimer:  Well, maybe the squirrels.  They're pretty smart.
Technical Details
Message-ID: <DJuG5K.6zp@news.cis.umn.edu>
Path: arc1-ca.pugleaf.net!umn.edu!thornley
References: <1995Dec14.120627.31590@ucl.ac.uk> <4b2me3$a8c@news.aloha.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.programmer.codewarrior,comp.lang.c++
Path: arc1-ca.pugleaf.net!umn.edu!thornley
From: thornley@cs.umn.edu (David H. Thornley)
Subject: Re: ANSI standards
Message-ID: <DJuG5K.6zp@news.cis.umn.edu>
Sender: news@news.cis.umn.edu (Usenet News Administration)
Nntp-Posting-Host: micro.cs.umn.edu
Organization: University of Minnesota, Twin Cities
References: <1995Dec14.120627.31590@ucl.ac.uk> <4b2me3$a8c@news.aloha.com>
Date: Tue, 19 Dec 1995 17:20:09 GMT