[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: systems requiring exit?
From: |
Paul Eggert |
Subject: |
Re: systems requiring exit? |
Date: |
Tue, 07 Nov 2006 12:57:35 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
"Ilya N. Golubev" <address@hidden> writes:
> That systems ignoring `return' value are now rare is not a reason to
> do so.
It's only part of the reason. The other part is that supporting a
proper declaration for 'exit', that works on all modern systems in
widespread use (both C and C++), was too much maintenance hassle. Please see
<http://lists.gnu.org/archive/html/autoconf-patches/2006-04/msg00024.html>
for the straw that broke the camel's back on this one.
> A reasonable solution would be standard tests as described above:
> whether the argument to `return' in `main' is ignored, and, if yes,
> how to call `exit' properly.
Yes, something like that would be reasonable, if someone could take
the time to write it, and (more important) test it on the ancient
systems where returning a nonzero value from 'main' doesn't conform to
the C89 standard.
> not even any detailed
> description of how that broken `return' would behave to test for,
As I recall, SCO 2.3.1 (1989) had a bug where "main () { return 0; }"
exited with status 1.
Conversely, in older SunOS versions -- I believe it was SunOS 2.0
(1985) through 3.5 (1988) -- "main () { return 1; }" exited with
status 0.
> Have no systems with broken `return' at hand,
That's the fundamental problem. These systems are _ancient_ -- they
all predate C89 -- and they are so old that nobody uses them any more.
- systems requiring exit?, Ilya N. Golubev, 2006/11/07
- Re: systems requiring exit?,
Paul Eggert <=
- Re: systems requiring exit?, Ilya N. Golubev, 2006/11/13
- Re: systems requiring exit?, Paul Eggert, 2006/11/13
- Re: systems requiring exit?, Thomas Dickey, 2006/11/13
- Re: systems requiring exit?, Ilya N. Golubev, 2006/11/13
- Re: systems requiring exit?, Howard Chu, 2006/11/13