On 5 June 2013 14:04, Richard Henderson <r...@twiddle.net> wrote: > On 06/05/2013 06:02 AM, Andreas Färber wrote: >> So why can't you apply QEMU_PACKED to the whole struct? Because of the >> contradicting void* alignment attribute of the first field? > > Actually, that might work. I'll give it a shot on x86_64 and change all > of the uses if it does work.
Bear in mind that making the entire structure 'packed' means gcc treats it as being potentially completely unaligned (ie attribute 'packed' means 'packed and not at all aligned', not just 'packed'). This isn't a big deal except for structs where we care about atomicity, though, which I don't think is the case here. -- PMM