ado@elsie.UUCP (Arthur David Olson) (12/01/85)
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