Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!cuae2!ihnp4!ethos!rti-sel!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: net.lang.c Subject: Re: Casting void - int question Message-ID: <673@dg_rtp.UUCP> Date: Mon, 3-Nov-86 17:38:33 EST Article-I.D.: dg_rtp.673 Posted: Mon Nov 3 17:38:33 1986 Date-Received: Wed, 5-Nov-86 21:19:58 EST References: <26@orion.UUCP> <393@sdchema.sdchem.UUCP> <3967@umcp-cs.UUCP> Lines: 21 Summary: Shall I pick a nit? Moi? Ah, what the hey... Yes I shall! > chris@umcp-cs.UUCP (Chris Torek) > The cast is correct, but the 4.1 and 4.2BSD compilers misunderstand > void functions. `void' types in these compilers tend to cause all > sorts of internal indigestion. This is a bug. Exactly right, of course. > Lint should note the cast as non-portable. 99 and 44/100 percent right. The *cast* is portable. But invocation of a function via a cast pointer to a function of differing type is not. Of course, lint may not be able to catch such subtleties easily, and the cast itself might be an appropriate place to warn. -- "Greater nits have little nits, upon their backs to bite 'em. And little nits have lesser nits, and so ad-infinitum..." --- (can't recall who I'm paraphrasing... Ogden Nash probably...) -- Wayne Throop !mcnc!rti-sel!dg_rtp!throopw