Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!mcnc!rti!xyzzy!throopw From: throopw@xyzzy.UUCP (Wayne A. Throop) Newsgroups: comp.lang.c,comp.sys.atari.st,comp.sys.amiga Subject: (VOID) vs (VOID (*)()) Message-ID: <350@xyzzy.UUCP> Date: Sat, 24-Oct-87 16:00:19 EST Article-I.D.: xyzzy.350 Posted: Sat Oct 24 16:00:19 1987 Date-Received: Mon, 26-Oct-87 04:22:30 EST References: <1912@gryphon.CTS.COM> <3294@sol.ARPA> <2545@cbmvax.UUCP> <4261@well.UUCP> Organization: Data General, RTP NC. Lines: 28 Xref: mnetor comp.lang.c:5128 comp.sys.atari.st:5917 comp.sys.amiga:9894 > ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) > I think your VOID definition is broken. In the file > exec/interrupts.h is the structure: > struct Interrupt { struct Node is_Node;APTR is_Data;VOID (*is_Code)();}; > Then, later on, when I try and do this: > foo () { extern long bar(); interrupt.is_Code = (VOID) bar; } > ...my compiler throws up. As well it might. It is illegal to assign expressions of void type. I presume what was intended was something like interrupt.is_Code = (VOID (*)())bar; which my compiler has much better luck with. Note that if you *invoke* that function via interrupt.is_Code(); or (*interrupt.is_Code)(); the results, of course, are undefined. -- "Have you got any money, Fezzik?" "Some. They pay well on the Brute Squad." "Well I just hope it's enough to buy a miracle, that's all." --- from The Princess Bride by William Goldman -- Wayne Throop !mcnc!rti!xyzzy!throopw