From: Keir F. <Kei...@cl...> - 2005-03-26 17:08:39
|
On 26 Mar 2005, at 14:13, Jimi Xenidis wrote: > KF> We always naturally align fields, even in packed structs. The > compiler > KF> doesn't do it for us, but we check it manually. > > hmm, is it padding you are trying to avoid? > Perhaps not using packed and adding the gcc option '-Wpadded' which > will automagically catch the offenders for you might be more > appropriate? > > Depending on manually checking can result in performance and > correctness issues that are difficult to track. Mostly it's used for structs that are part of the public Xen interface. I don't want different compilers packing fields in different ways. -- Keir |