This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: go32-nat, always a thread


> Date: Sat, 9 Aug 2008 15:30:25 -0400
> From: Daniel Jacobowitz <drow@false.org>
> 
> On Sat, Aug 09, 2008 at 09:16:09PM +0200, Mark Kettenis wrote:
> > Instead of
> > 
> > struct foo {
> >   char c __attribute__((packed));
> >   int d __attribute__((packed));
> > };
> > 
> > you can (should?) write
> > 
> > struct foo {
> >   char c;
> >   int d;
> > } __attribute__((packed));
> 
> Indeed, should (even must).  I believe old versions of GCC silently
> ignored the packed attribute on fields, but I'm not 100% certain of
> that - I must be mistaken if the construct in go32-nat.c previously
> worked.

It's actually the other way around: some old versions of GCC (and I'm
talking _real_ old, like 2.8x) had a bug whereby the packed attribute
on the whole struct would not work, while doing that on each field
would.

If that problem is long gone now, I'm fine with marking the whole
struct with the attribute.

Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]