Path: utzoo!utgpu!water!watmath!clyde!rutgers!umn-d-ub!umn-cs!smiller From: smiller@umn-cs.cs.umn.edu (Steven M. Miller) Newsgroups: comp.lang.c Subject: assignment question Keywords: array of pointers to functions returning void Message-ID: <3544@umn-cs.cs.umn.edu> Date: 18 Jan 88 23:48:40 GMT Organization: University of Minnesota, Computer Science Lines: 34 Posted: Mon Jan 18 17:48:40 1988 I'm trying to set up a vector table for a 68020 in C. For some of the vectors I have external interrupt handlers, for others I only have addresses for the routines. I'd like to do the following void (*vectors[255](); extern void int_hndlr(); main() { vectors[1] = int_hndlr; vectors[2] = (void *) 0x1234; } Of course my HP cross compiler isn't as forgiving as Sun's C compiler and the above fails on the second assignment (at compile time that is) Am I doing something terribly illegal in C or am I just doing what I want to do incorrectly. I'll probably end up using straight assembly, but would prefer to avoid it. Oh yeah, and if I do the opposite, create the array without the () then the first assignment fails. -Steve -- -Steve Miller, U of MN