Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Parameter mismatch legality question
Message-ID: <1990Nov17.041613.7218@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1990Nov15.224353.155@mozart.amd.com> <14486@smoke.brl.mil> <1990Nov16.212511.13166@mozart.amd.com>
Date: Sat, 17 Nov 90 04:16:13 GMT

In article <1990Nov16.212511.13166@mozart.amd.com> tim@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@zoo.toronto.edu   utzoo!henry
