Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!ames!amdcad!amd!intelca!mipos3!omepd!intelisc!littlei!ogcvax!pase From: pase@ogcvax.UUCP (Douglas M. Pase) Newsgroups: comp.lang.c,comp.bugs.4bsd Subject: Re: lint bug fix needed Message-ID: <1369@ogcvax.UUCP> Date: Fri, 31-Jul-87 20:41:09 EDT Article-I.D.: ogcvax.1369 Posted: Fri Jul 31 20:41:09 1987 Date-Received: Sat, 8-Aug-87 02:04:00 EDT References: Reply-To: pase@ogcvax.UUCP (Douglas M. Pase) Organization: Oregon Graduate Center, Beaverton, OR Lines: 44 Xref: mnetor comp.lang.c:3483 comp.bugs.4bsd:479 I have been able to trace this down further by following the hunch of a colleague. It seems the problem is that lint considers structures of the same size to be the same structures, even when they are not. In the example below, I experimented with several different sizes for the structures `s_bstack' and `s_symtab', and lint proclaimed the argument usage to be inconsistent whenever the sizes were different. It failed to mention any inconsistency whenever the sizes were the same, even when it was because of padding in the field allocation to allign pointers (doubles, floats, whatever) on certain boundaries (e.g. allocating 4 bytes for a `short'). Question: Is this considered a "bug" or a "feature"? If it's a bug, is there a fix? If it's a "feature", someone should be shot! Script started on Fri Jul 31 17:15:13 1987 [101] num lint4.c 1 struct s_bstack { 2 char top; 3 }; 4 5 struct s_symtab { 6 char node; 7 }; 8 9 bind_unif_mgu(eval) 10 struct s_symtab *eval; 11 { 12 if (! bis_empty(eval)) 13 ; 14 } 15 16 bis_empty(stack) 17 struct s_bstack *stack; 18 { 19 return(stack->top <= 0); 20 } [102] lint lint4.c lint4.c: bind_unif_mgu defined( lint4.c(11) ), but never used [103] exit script done on Fri Jul 31 17:17:17 1987 -- Doug Pase -- ...ucbvax!tektronix!ogcvax!pase or pase@Oregon-Grad.csnet