Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site wateng.UUCP Path: utzoo!watmath!wateng!ksbszabo From: ksbszabo@wateng.UUCP (Kevin Szabo) Newsgroups: net.lang.c,net.bugs.4bsd Subject: Re: pcc compiler error Message-ID: <1997@wateng.UUCP> Date: Mon, 11-Feb-85 03:10:24 EST Article-I.D.: wateng.1997 Posted: Mon Feb 11 03:10:24 1985 Date-Received: Sat, 16-Feb-85 05:34:13 EST References: <814@enea.UUCP> <1240@eagle.UUCP> Reply-To: ksbszabo@wateng.UUCP (Kevin Szabo) Organization: VLSI Group, U of Waterloo Lines: 23 Xref: watmath net.lang.c:4387 net.bugs.4bsd:1385 Summary: pcc error also affects LINT. > struct xy { > int x; > int y; > } a; > main() > { > struct xy *p; > p = &a; > if (*p) { > /* compiler error: zzzcode- bad type */ > } > } >This is not legitimate code (and the compiler should point this out). Our BSD 4.2 compiler generates the same error when I just compile it. As Marty Shannon says, the code is incorrect. The thing that mystifies me is that LINT didn't even peep when I sent the code to it. Thus whatever is wrong with CC is also confusing lint, but in a way that causes LINT to incorrectly shut up. Kevin -- Kevin Szabo watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)