Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!phoenix!rutabaga!viktor From: viktor@rutabaga.Princeton.EDU (Viktor Dukhovni) Newsgroups: comp.sys.sgi Subject: Compiler void support under 3.2 Keywords: cc, void functions Message-ID: <12190@phoenix.Princeton.EDU> Date: 14 Dec 89 00:40:50 GMT Sender: news@phoenix.Princeton.EDU Lines: 29 The following code is incorrectly rejected by the C compiler under 3.2 ------------------------- void foo() { } ; void bar() { } ; void (*z)() ; main() { z = bar ; z = (1==1) ? foo : bar ; } --------------------------------- Note that z=bar is ok, but the almost equivalent line below which should set z=foo is not. It appears the cc forgets the types of the arguments of ?: I ran into this when porting Perl (which noticed this during configure and reported incorrect handling of void function pointers.), and when porting RCS, which bombed (the configuration does not provide for broken compilers) -- Viktor Dukhovni : ARPA <...!uunet!princeton!math!viktor> : UUCP Fine Hall, Washington Rd., Princeton, NJ 08544 : US-Post +1-(609)-258-5792 : VOICE