register struct or union (Re: Registers on the VAX 11/780?)
Sam Kendall
kendall at talcott.UUCP
Tue Jul 23 02:20:35 AEST 1985
> Since code written on one machine is
> very often taken to others, and the word "register" isn't very hard to
> type, you should declare almost everything a register. Even data types
> you don may not think fit in registers, like strucutures, enums,
> doubles, and unions.
>
> Ken Arnol
Conceptually nice, but register structs and unions will fail with pcc-based
compilers due to a compiler bug. The compiler treats `s.member' as
`(&s)->member'; i.e., in the compiler, `->' rather than `.' is the primitive.
Martin Minow ran into this problem porting his cpp to UNIX.
Sam Kendall
Delft Consulting Corp.
{allegra, cmcl2, ihnp4}!delftcc!sam
More information about the Comp.lang.c
mailing list