Casting void - int question
Wayne Throop
throopw at dg_rtp.UUCP
Tue Nov 4 08:38:33 AEST 1986
> chris at 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
More information about the Comp.lang.c
mailing list