Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rochester!pt!ius2.cs.cmu.edu!edw From: edw@ius2.cs.cmu.edu (Eddie Wyatt) Newsgroups: comp.lang.c,comp.unix.questions Subject: lint and VARARGS Message-ID: <1236@ius2.cs.cmu.edu> Date: Mon, 13-Jul-87 20:28:36 EDT Article-I.D.: ius2.1236 Posted: Mon Jul 13 20:28:36 1987 Date-Received: Wed, 15-Jul-87 01:19:31 EDT Distribution: na Organization: Carnegie-Mellon University, CS/RI Lines: 60 Xref: mnetor comp.lang.c:3030 comp.unix.questions:3183 The problem, the answer... :bc.c /* VARARGS 0 */ void tt(x,y) int x,y; { (void) printf("%d %d\n",x,y); } :bb.c extern void tt(); main() { tt(9.0); } lint bc.c bb.c bb.c: bc.c: tt, arg. 1 used inconsistently bc.c(4) :: bb.c(5) >From the man pages: /*VARARGS n*/ suppresses the usual checking for variable numbers of arguments in the following function declaration. The data types of the first n arguments are checked; a missing n is taken to be 0. From: Ray Butterworth.Many versions (especially those like BSD based on the PCC version) .of lint have a bug that causes VARARGS0 to ignore the 0. i.e. asking .for any # >0 checks only the first # arguments, but asking for # = 0 .checks all arguments. .If you already knew this... No, I didn't know it for sure, but I suppected it after I couldn't get the damn thing to work right. I hope you don't mind me posting your answer Ray. I appreciate the help very much. I appreciate others that have replied also but I would like to say, I do know how the type "man lint". :-) -- Eddie Wyatt e-mail: edw@ius2.cs.cmu.edu terrorist, cryptography, DES, drugs, cipher, secret, decode, NSA, CIA, NRO.