Article View: net.lang.c
Article #9717Re: Casting void - int question
From: Wayne Throop
Date: Mon, 03 Nov 1986 22:38
Date: Mon, 03 Nov 1986 22:38
21 lines
1418 bytes
1418 bytes
> 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 <the-known-world>!mcnc!rti-sel!dg_rtp!throopw
Technical Details
Message-ID:
<673@dg_rtp.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!gatech!cuae2!ihnp4!ethos!rti-sel!dg_rtp!throopwReferences:
<26@orion.UUCP> <393@sdchema.sdchem.UUCP> <3967@umcp-cs.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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!