asserts and unexpected returns (was: Re: Assert)

John F. Haugh II jfh at rpp386.cactus.org
Wed Nov 14 20:04:34 AEST 1990


In article <4643 at segue.segue.com> jim at segue.segue.com (Jim Balter) writes:
>No one has claimed that assert cannot be made to return on some systems,
>yet this is at least the third time that you have responded to some *other*
>point as though that claim were being made.  Can you say *strawman*?

The other objector to my claim that assert() may return has claimed
that implementations which have an assert() that can be made to return
should be ignored, despite the fact that AT&T UNIX 5.2.1 (and all releases
that I know of before it) has exactly this behavior.  Dave has repeatedly
stated that for all "real" UNIX's assert() never returns, without
accepting that this criteria is only true for some flavors of AIX and
BSD.  In any case, Dave is arguing against reality - the exception proves
the argument in this case, and the argument was that assert cannot be
relied on to always exit.  Providing the single counterexample of SCO
Xenix 2.2.3 (and of course, AT&T UNIX 5.2.1) disproves his statement
that assert() always exits.  [ And yes, he has made that claim, before
you state that this is a strawman. ]

Anyhow, this is getting old, and has long strayed away from the original
topic, which was to be careful of unexpected returns.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"SCCS, the source motel!  Programs check in and never check out!"
		-- Ken Thompson



More information about the Comp.unix.internals mailing list