Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!pasteur!cory.Berkeley.EDU!talvola From: talvola@cory.Berkeley.EDU (Erik Talvola) Newsgroups: comp.lang.c Subject: Problem with C compiler Message-ID: <14505@pasteur.Berkeley.EDU> Date: 9 Jun 89 18:51:05 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: talvola@cory.Berkeley.EDU (Erik Talvola) Organization: University of California, Berkeley Lines: 22 In trying to compile a program on an HP workstation here at Berkeley (HP 9000/200 series), I ran into a problem with the C compiler. I have the following lines of code: static void default_new_handler (); void (*__new_handler)() = default_new_handler; This gets an error that the operands of = have incompatible types. This is very annoying. I can't put a cast on the right hand side, or else it gets an error about an illegal cast. This compiles fine on a Sun 3/50 with the stock compiler - but not with the HP one. Does anyone have any ideas on how I can work around this? I have tried several things and none of them work. Declarations of function pointers work, but I can assign to them something which is a function. Many thanks in advance... ---------------------------+ Erik Talvola | "It's just what we need... a colossal negative talvola@cory.berkeley.edu | space wedgie of great power coming right at us ..!ucbvax!cory!talvola | at warp speed." -- Star Drek