Structures as arguments, lint checking

Wayne Throop throopw at dg_rtp.UUCP
Fri Oct 24 04:07:27 AEST 1986


> Schauble at MIT-MULTICS.ARPA (Paul Schauble)

> I was recently suprised to discover that Microsoft C and two different
> lints all pass without complaint the sequence

>     struct sa { int a; } a;
>     struct sb { int b; } b;
>     void sub(x) struct sa *x; {}
>     void main(){sub(&b);}

(I've made minor edits to the example to turn it into a lint-able unit.)
Our SysV.2 lint catches this problem, complaining of "argument used
inconsistently".  Our compiler does not complain, but then most
compilers don't complain about such things.  Which two lints didn't
catch it?  This seems a very odd thing for any lint to miss.

--
Old computers go into computer museums,
but old software goes into production.
                                        --- Eric Bush
-- 
Wayne Throop      <the-known-world>!mcnc!rti-sel!dg_rtp!throopw



More information about the Comp.lang.c mailing list