Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!russel@UCL-CS.ARPA
From: Russel Winder 
Newsgroups: net.unix-wizards
Subject: void function and pointers
Message-ID: <8230@brl-tgr.ARPA>
Date: Mon, 11-Feb-85 10:47:37 EST
Article-I.D.: brl-tgr.8230
Posted: Mon Feb 11 10:47:37 1985
Date-Received: Thu, 14-Feb-85 02:53:42 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 21

Dear all,

Please could someone enlighten me about the following piece
of C code.  It looks perfectly legal to me and if I replace
all instances of void with int then it works as expected.

	static void test() { printf("Hello there\n"); }
	static void (*fptr) () = test;
	main() { (*fptr)(); }

The third line gives the error:

	, line 5: operands of = have incompatible types


Russel Winder			(russel@ucl-cs)
Department of Computer Science
University College London
Gower Street
London		WC1E 6BT
England