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!burl!ulysses!allegra!mit-eddie!genrad!wjh12!talcott!harvard!seismo!brl-tgr!ron From: ron@brl-tgr.ARPA (Ron Natalie) Newsgroups: net.lang.c Subject: Re: declaring routines which return function pointers Message-ID: <6618@brl-tgr.ARPA> Date: Mon, 17-Dec-84 11:35:58 EST Article-I.D.: brl-tgr.6618 Posted: Mon Dec 17 11:35:58 1984 Date-Received: Tue, 18-Dec-84 07:07:03 EST References: <249@alberta.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 22 > I have a routine which resembles the following: > > int (*f)(); > int fa(), fb(); > > fa() { > f = fb; > return(f); > } > > fb() { > } > > The problem with the above is that lint complains about an illegal combin- > ation of a pointer with an integer in the 'return' statement. I have tried > various casts and function declarations to try to satisfy lint, but none of > them have worked. Does anybody know what I should do to keep lint happy? > > Robert Lake (alberta!lake) > University of Alberta Have you tried declaring fa as a function returning pointer to function?