Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!mimsy!mangoe
From: mangoe@mimsy.UUCP (Charley Wingate)
Newsgroups: comp.lang.misc
Subject: Check the Arg Count
Message-ID: <4886@mimsy.UUCP>
Date: Mon, 29-Dec-86 23:12:11 EST
Article-I.D.: mimsy.4886
Posted: Mon Dec 29 23:12:11 1986
Date-Received: Tue, 30-Dec-86 21:03:48 EST
References: <3395@amd.UUCP>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 25

Mike Eager writes:

>One should note that Lint does several things which are not done by the
>C compiler, shouldn't be done by the compiler, and which are not strictly
>related to the language.  One of these is verifing the matching of the
>number of arguments between the caller and callee.  Other is reference/
>lack of reference to globals.

Oh?

In case you hadn't heard, compilers are not COMPELLED to allow variable
length argument lists in most languages.  My personal opinion is that they
ought to be expressly forbidden unless there is some syntax that makes it
quite clear what is going on.  In a single compilation, after all, this is a
static property of the code anyway; you may want to argue that it shouldn't
cause the compiler to bomb (and I may even agree with you, grudgingly), but
I don't see the point of never checking for it at all.  The latter comments
also pertain to the references to globals, too.

Many installations have paper rules about not having any warning messages in
compiled code.  I cynically observe that the lint/cc separation has the
advantage that the compiler generates no warning messages at all-- at least,
it's an advantage to the writers of "tricky" code.

C. Wingate