Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ll-xn!mit-eddie!genrad!decvax!mcnc!rti-sel!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: net.lang.c Subject: Re: Structures as arguments, lint checking Message-ID: <660@dg_rtp.UUCP> Date: Thu, 23-Oct-86 14:07:27 EDT Article-I.D.: dg_rtp.660 Posted: Thu Oct 23 14:07:27 1986 Date-Received: Sat, 25-Oct-86 01:22:31 EDT References: <4738@brl-smoke.ARPA> Lines: 22 Summary: SysV.2 lint catches this... most compilers don't > Schauble@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 !mcnc!rti-sel!dg_rtp!throopw