Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site elsie.UUCP Path: utzoo!watmath!clyde!burl!hou3c!hocda!houxm!ihnp4!zehntel!hplabs!hao!seismo!umcp-cs!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: net.lang.c Subject: Re: Non-reentrant code generated by C compiler (reposting) Message-ID: <1220@elsie.UUCP> Date: Fri, 14-Sep-84 19:09:49 EDT Article-I.D.: elsie.1220 Posted: Fri Sep 14 19:09:49 1984 Date-Received: Tue, 25-Sep-84 03:42:47 EDT Organization: NIH-LEC, Bethesda, MD Lines: 41 Let's try for a lint trap that everyone can agree on. Remove the change given in <1154@elsie.UUCP>, then install this one: ed /usr/src/cmd/lint/lint.c /cfp =/a #ifndef OLDVERSION if (pflag && cfp->stype == (FTN | STRTY)) { werror("struct return reentrancy varies among systems"); werror("pre-Version-7 systems don't do struct returns"); } #endif . w q Perhaps the long run thing to do is change "lint" so that you can ask for different degrees of portability checking. "lint -P V.2", "lint -P V", "lint -P III", "lint -P 7", "lint -P 6", "lint -P 5"...? Another thing we can is to call software "V7-portable" rather than "portable" when the former label is more accurate. And by way of explanation. . .I was working on a PDP 11/40 when Version 7 was released. And was horrified to learn that Bell Labs was abandoning support of 11/40's (UNIX had grown too large to fit in their address space). So for years after other folks had converted to Version 7, I worked in a Version 6 environment. Whence my (over-?)sensitivity to the plight of Version 6 folk. Finally-- > There's nothing unportable about structure returns if your code doesn't > need reentrancy, which is true of 95% of all C programs at least. Clearly I believe it's worth trying to catch the 5%. Then again, I'm risk-averse: I'd be loathe to take an airline flight if I had a 95% chance of surviving. -- UNIX is an AT&T Bell Laboratories trademark. -- ...decvax!seismo!umcp-cs!elsie!ado (301) 496-5688 (DEC, VAX and Elsie are Digital Equipment Corp. and Borden's trademarks)