From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1240 invoked by alias); 9 Aug 2008 21:32:08 -0000 Received: (qmail 1231 invoked by uid 22791); 9 Aug 2008 21:32:07 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 09 Aug 2008 21:31:29 +0000 Received: from HOME-C4E4A596F7 ([84.229.211.50]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K5C00447RSV93F0@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Sun, 10 Aug 2008 00:31:43 +0300 (IDT) Date: Sat, 09 Aug 2008 21:32:00 -0000 From: Eli Zaretskii Subject: Re: go32-nat, always a thread In-reply-to: <20080809193025.GA7871@caradoc.them.org> X-012-Sender: halo1@inter.net.il To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: References: <200808080439.17254.pedro@codesourcery.com> <200808091853.44771.pedro@codesourcery.com> <200808091916.m79JG9TD003200@brahms.sibelius.xs4all.nl> <20080809193025.GA7871@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00257.txt.bz2 > Date: Sat, 9 Aug 2008 15:30:25 -0400 > From: Daniel Jacobowitz > > 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.