Parameter mismatch legality question
Henry Spencer
henry at zoo.toronto.edu
Sat Nov 17 15:16:13 AEST 1990
In article <1990Nov16.212511.13166 at mozart.amd.com> tim at amd.com (Tim Olson) writes:
>| > c) Illegal
>
>I like that answer, but what about, say the UNIX "open" library call,
>which has the optional "mode" parameter used this way...
The only way to legally do System V's wretchedly stupidly botched open()
call, which gratuitously added an optional parameter rather than sensibly
providing a new function with three parameters to supplement open(), is
to make it a varargs function. Varargs functions *must* have a prototype
in scope, and then follow somewhat different rules.
--
"I don't *want* to be normal!" | Henry Spencer at U of Toronto Zoology
"Not to worry." | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list