Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!princeton!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c,net.bugs Subject: Re: C Compiler bug (and fix for a different one) Message-ID: <5872@alice.uUCp> Date: Tue, 29-Jul-86 10:22:10 EDT Article-I.D.: alice.5872 Posted: Tue Jul 29 10:22:10 1986 Date-Received: Wed, 30-Jul-86 00:37:07 EDT References: <461@watmath.UUCP> Organization: Bell Labs, Murray Hill Lines: 23 Xref: mnetor net.lang.c:5488 net.bugs:297 > If I'm not throwing them away, what is it you think I'm doing with them? > Also, the proposed ANSI draft explicitly states that the second and third > operands of ?: may each have (void) type, so I'm not trying anything > unusual here. I think you're using them to form another value. It is irrelevant that you're then throwing that value away. Suppose f() is void and you say: f()+1; Now you're adding 1 to a void and throwing the result away. Should that be permitted? More seriously, I can actually see both sides of the argument. But the construction ...?f():g() where f() and g() are void is close enough to the edge that I wouldn't want to use it in any context where I might ultimately want to run it on a lot of compilers. Why not just say if (...) f(); else g(); ??