derived types
cottrell at nbs-vms.ARPA
cottrell at nbs-vms.ARPA
Fri Jan 18 06:10:52 AEST 1985
/*
one of the constraints not mentioned so far (or i missed it) is that
sizeof(int) must be the same as sizeof(int *). the practice of defining
derived types is an attempt to avoid machine dependency. however, why
not say what we REALLY (yes, my tty has caps) mean: dispense with
char, short, int, long, and use byte, word, long, and quad. my model
is the vax, with sizes of 8, 16, 32, & 64 bits respectively. while
this is somewhat ethnocentric, it pays homage to the fact that unix
was developed on these two machines primarily. weird machines such
as u1108 (b=9, w=18, l=36, q=72) and cdc6400 (b=6?, w=15, l=30, q=60)
would have to adapt as best they can (they kinda have to now anyway).
this unfortunately blows the correspondence between int & int *, but
i suspect that the standard will have something more to say about
ptr's than the opening sentence of this paragraph. (b=10 for cdc6400?)
*/
More information about the Comp.lang.c
mailing list