C Compiler bug (and fix for a different one)

Ray Butterworth rbutterworth at watmath.UUCP
Tue Jul 29 02:10:44 AEST 1986


> > void f3(which)
> > {
> >     extern void f1(),f2();
> >     which?f1():f2();
> > }
> > cc(1) gives an "incompatible types" error.
> 
> As it should.  The only thing you're allowed to do with void values
> is throw them away.

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.



More information about the Comp.lang.c mailing list