Subject: Re: Use of sizeof()
To: None <current-users@NetBSD.ORG,>
From: Peter Seebach <>
List: current-users
Date: 07/11/1995 06:52:35
In ANSI C, you are allowed to pad as much as you feel is necessary.  In
K&R C, you are allowed to do damn near anything.

If an array of struct foo's requires word alignment, the sizeof() a given
struct foo should be a multiple of the size of a word; padding to 8 is

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.