Schauble@MIT-MULTICS.ARPA (Paul Schauble) (10/20/86)
I was recently suprised to discover that Microsoft C and two different
lints all pass without complaint the sequence
struct sa { definition a} a;
struct sb { definition b} b;
void sub(x)
struct sa *x;
{....
}
sub(&b);
Is there something I don't know about that causes & to lose the
information as to the type of structure? Or does everyone happen to have
the same bug?
Paul
Schauble at MIT-Multics
throopw@dg_rtp.UUCP (Wayne Throop) (10/23/86)
> 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 <the-known-world>!mcnc!rti-sel!dg_rtp!throopw