Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: pcc compiler error Message-ID: <5127@utzoo.UUCP> Date: Wed, 27-Feb-85 13:38:43 EST Article-I.D.: utzoo.5127 Posted: Wed Feb 27 13:38:43 1985 Date-Received: Wed, 27-Feb-85 13:38:43 EST References: <8494@brl-tgr.ARPA> Organization: U of Toronto Zoology Lines: 17 > It seems to me that the code is legal C (though not necessarily > all that meaningful). Since C now allows structures to be passed > as parameters, it appears inconsistent to allow something like > "foo(*p)" but not "if(*p)". > > Since the code is legal, lint has no reason to complain. The > error message you received indicated that the back end of your > compiler was not able to generate code. There are C compilers > that will compile this program. Sorry, the code is not legal. Passing a struct as a parameter is basically struct assignment, which is in modern C. Giving a struct to an if is struct comparison (against 0), which is not and has never been part of C. (It's not in the current ANSI C draft either.) -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry