Subject: Re: Use of sizeof()
To: Peter Seebach <>
From: Chris G Demetriou <Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU>
List: current-users
Date: 07/11/1995 20:20:06
> Code should use sizeof(struct foo) rather than 6; since sizeof() is a
> compile time operator, this may be a millisecond longer of compile time,
> but execution speed will not be hurt.

The real problem is (probably 8-) not with code that uses '6' rather
than 'sizeof' it's with code that assumes that structures can be
mapped in any sane way to the hardware's definition of the

Having to use arrays of 'char's for everything is ... annoying, but
(as far as i know) is the only truly portable way of dealing with
hardware structures.