Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site elsie.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!ut-sally!seismo!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: net.unix-wizards,net.sources.bugs Subject: Re: Help wanted with C/4.?BSD/VAX register short problem Message-ID: <5305@elsie.UUCP> Date: Sun, 1-Dec-85 14:29:51 EST Article-I.D.: elsie.5305 Posted: Sun Dec 1 14:29:51 1985 Date-Received: Tue, 3-Dec-85 07:28:56 EST Organization: NIH-LEC, Bethesda, MD Lines: 28 Keywords: C VAX BSD register short Xref: watmath net.unix-wizards:15934 net.sources.bugs:594 In article <1016@munnari.OZ>, kre@munnari.OZ (Robert Elz) writes: > What follows is a test for correctness of C compilers in this > area. The posting is appreciated; however, it doesn't seem to show up whatever problem it is that convinced the Berkeley folks to ignore the "register" advice in "register short" (et al.) declarations. This is the way the Berkeley folks got rid of register shorts (code from "pcc/local.c", the trade secret status precludes a more complete posting): #ifdef TRUST_REG_CHAR_AND_REG_SHORT if( t==INT || t==UNSIGNED || t==LONG || t==ULONG /* tbl */ || t==CHAR || t==UCHAR || t==SHORT /* tbl */ || t==USHORT || ISPTR(t)) return(1); /* tbl */ #else if( t==INT || t==UNSIGNED || t==LONG || t==ULONG /* wnj */ || ISPTR(t)) return (1); /* wnj */ #endif If I generate a C compiler from the distributed 4.1BSD sources with TRUST_REG_CHAR_AND_REG_SHORT defined, the generated compiler passes the "correctness test." So the question remains: why did the Berkeley folks get rid of register shorts? -- Short is a Randy Newman trademark. -- UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado@seismo.ARPA DEC, VAX and Elsie are Digital Equipment and Borden trademarks