Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!mcnc!ece-csc!ncrcae!ncr-sd!ncrlnk!ncrpcd!wright!jholbach From: jholbach@wright.EDU (Jim Holbach) Newsgroups: comp.lang.c Subject: Re: Type checking in conditional expressions Message-ID: <189@wright.EDU> Date: Mon, 19-Oct-87 18:29:09 EDT Article-I.D.: wright.189 Posted: Mon Oct 19 18:29:09 1987 Date-Received: Wed, 21-Oct-87 00:32:02 EDT References: <186@wright.EDU> Organization: Wright State University, Dayton OH, 45435 Lines: 16 in article <186@wright.EDU>, I mentioned a program > main() > { void function(); > void (*name)(); > name = function; > name = (0?name:function); > } which causes the compiler to complain that the operands of : in the conditional expression are of incompatible operands. It has been pointed out to me that if "int" is substituted for "void" in both the declaration of function and the definition of name, then the program will compile without any complaints whatsoever. Curiouser and curiouser...