Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsla.UUCP Path: utzoo!linus!decvax!tektronix!hplabs!sdcrdcf!sdcsvax!sdcsla!west From: west@sdcsla.UUCP (Larry West) Newsgroups: net.lang.c Subject: Re: Shouldn't this work? Message-ID: <648@sdcsla.UUCP> Date: Fri, 24-Aug-84 19:26:03 EDT Article-I.D.: sdcsla.648 Posted: Fri Aug 24 19:26:03 1984 Date-Received: Thu, 30-Aug-84 07:43:49 EDT References: <347@zeus.UUCP> Reply-To: west@sdcsla.UUCP (Larry West) Organization: UC San Diego: Institute for Cognitive Science Lines: 20 Yes, it should, and it probably is a problem with the 4.2bsd compiler. Try this fragment for fun: extern void *beep(); void (*funk)() = (void (*)()) beep; main () {} When used in this skeleton form, "cc" ("ld") only complained that "beep" was undefined, and "lint" only said that "funk" was defined but never used. [The original article had declared "extern void beep()", and used it in an equivalent structure initialization]. I don't know what "void *" >means<, nor why it is type-compatible in this case, but there it is. Example tried on Sun-2 and Vax. Long live 4.2bsd. -- Larry West, UC San Diego, Institute for Cognitive Science -- decvax!ittvax!dcdwest!sdcsvax!sdcsla!west -- ucbvax!sdcsvax!sdcsla!west -- west@NPRDC