expr?(void):(void)

Simon Brown simon at cstvax.UUCP
Tue Aug 5 03:37:30 AEST 1986


In article <1327 at ncoast.UUCP> allbery at ncoast.UUCP (Brandon Allbery) writes:
>
>| void f3(which)
>| {
>|     extern void f1(),f2();
>|     which?f1():f2();
>| }
>| cc(1) gives an "incompatible types" error.
>
>That's not a bug, it's a feature.  Literally.
>

Is this the same feature that disallows

	f(which)
	{
		extern void f1(), f2();
		void (*fp)();
		fp = which? f1 : f2;
		(*fp)();
	}


which gives the same "incompatible types" error, but which can't be explained
as a confusion between functions and precedures.

-- 

			-------------------------------------------------
			| Simon Brown,	Dept. of Computer Science,	|
			|		Edinburgh University		|
			| ...!mcvax!ukc!cstvax!simon			|
			-------------------------------------------------



More information about the Comp.lang.c mailing list