Short code to determine compiler's
Ari Halberstadt
ari at eleazar.dartmouth.edu
Wed Aug 16 02:41:45 AEST 1989
In article <171 at bms-at.UUCP> stuart at bms-at.UUCP (Stuart Gathman) writes:
#>In article <579 at targon.UUCP>, andre at targon.UUCP (andre) writes:
#>
#>> register n1, n2, n3, n4, n5, n6, n7, n8; /* etc. */
#>> int *a;
#>
#>> a = &n8;
#>> a = &n7;
#>
#>> /* repeat n6 - n2 */
#>> a = &n1;
#>
#>Taking the address of a register variable is not allowed even when it
#>is not actually in a register.
It should be illegal, but not all compilers enforce the rule! I tried the
program on our VAX running 4.3BSD, and it compiled it very happily.
--
Ari Halberstadt '91, "Long live short signatures"
More information about the Comp.lang.c
mailing list