dillon@CORY.BERKELEY.EDU (Matt Dillon) (10/21/87)
: 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)();
:};
That means 'pointer to function returning nothing'
: Then, later on, when I try and do this:
:
:foo ()
:{
: extern long bar();
:
: interrupt.is_Code = (VOID) bar;
:}
:
: ...my compiler throws up. Something about an invalid use of the
:'void' declaration. I have Manx 3.4b.
You are attempting to cast a function returning a long into... nothing,
which certainly does not match a function returning void. This is what you
want:
interrupt.is_Code = (void (*)())bar;
Casting bar into a function returning nothing.
-Matt