Article View: net.lang.c++
Article #63Re: experiences porting c++ release 1 to release 2 sun-2
From: Jonathan P. Leech
Date: Thu, 20 Mar 1986 18:46
Date: Thu, 20 Mar 1986 18:46
31 lines
1686 bytes
1686 bytes
Expires:
Sender:
Followup-To:
Organization : California Institute of Technology
Keywords:
In article <229@ubu.warwick.UUCP> jeff@warwick.UUCP (Jeff Smith) writes:
>in addition, to compile programs
>with static constructors or destructors, like
>hello world, you need to change munch.c: the line
> return 1;
>should be changed to
> exit (1);
>in the function main.
>
>the default exit status of a process on
>sun-2 rel 2 is 0, not the return value of main.
>
>jeff@warwick.uucp
>..mcvax!warwick!jeff
This turns out to also be the case for Amdahl UTS (in
contradiction to the April ANSI C draft and every other Unix system
I've worked on.) In fact, crt0.s under UTS explicitly says 'exit with
0 status if main returns'. Sigh. Probably the distributed munch.c
should be modified to call exit instead of return to account for as
many (brain-damaged) environments as possible.
-- Jon Leech (jon@csvax.caltech.edu || ...seismo!cit-vax!jon)
__@/
Technical Details
Message-ID:
<274@cit-vax.Caltech.Edu>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!gatech!seismo!cit-vax!jonReferences:
<224@ubu.warwick.UUCP> <229@ubu.warwick.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!gatech!seismo!cit-vax!jon From: jon@cit-vax.Caltech.Edu (Jonathan P. Leech) Newsgroups: net.lang.c++ Subject: Re: experiences porting c++ release 1 to release 2 sun-2 Message-ID: <274@cit-vax.Caltech.Edu> Date: Thu, 20-Mar-86 13:46:22 EST Article-I.D.: cit-vax.274 Posted: Thu Mar 20 13:46:22 1986 Date-Received: Fri, 21-Mar-86 07:04:57 EST References: <224@ubu.warwick.UUCP> <229@ubu.warwick.UUCP> Reply-To: jon@cit-vax.UUCP (Jonathan P. Leech) Distribution: net Organization: California Institute of Technology Lines: 27 Summary: UTS has the same bug as Sun release 2