sizeof
Henry Spencer
henry at utzoo.UUCP
Tue Feb 5 11:06:09 AEST 1985
> ... Someone also said that ptr's to different objex
> may be different sizes. Where & why? I realize that a certain machine
> may desire this to make implementation as efficient as possible, but I
> think the designers should just bite the bullet and make all ptr's
> the same size. The machine is probably brain damaged anyway. Any
> machine not byte addressable is an inhospitable host for C at best.
Quite true, but often a poor C implementation is better than none.
The idea is to make it no poorer than you have to. This often means
that whatever kludges are needed for "char *" really shouldn't have
to be applied to all pointers.
> As I said before, my model is the pdp-11/vax architecture. The 68000
> and 32032 fall into this category. I really don't care if my code
> is not portable to some weird architecture I have never seen or
> do not wish to see again (u1108).
I'm afraid what you are really saying is that you don't really care
about portability at all. "If the machine is very similar to mine,
maybe it'll run; if not, tough." I understand but can't sympathize.
It's not that much harder to do it right.
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
More information about the Comp.lang.c
mailing list