From owner-cvs-all Mon Sep 23 3:19:31 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C115337B401; Mon, 23 Sep 2002 03:19:29 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 767F543E65; Mon, 23 Sep 2002 03:19:28 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA26524; Mon, 23 Sep 2002 20:19:22 +1000 Date: Mon, 23 Sep 2002 20:28:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alfred Perlstein Cc: Peter Wemm , , Subject: Re: cvs commit: src/sys/alpha/pci tsunamireg.h src/sys/boot/ia64/skiload main.c src/sys/i386/include npx.h src/sys/ia64/include reg.h signal.h src/sys/sys cdefs.h In-Reply-To: <20020923061917.GG6262@elvis.mu.org> Message-ID: <20020923202345.K17455-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 22 Sep 2002, Alfred Perlstein wrote: > * Peter Wemm [020922 22:55] wrote: > > peter 2002/09/22 22:55:11 PDT > > ... > > There are over 400 __attribute__((packed)) to deal with, that can come > > later. I just want to use __packed in new code rather than add more > > gcc-ism's. > > I really like what you've done, however don't you think that the > places that do not have __packed/__aligned shouldn't have it defined > to nothing... therefore you can add: > > #ifndef __packed > #error you must define __packed or bad things will happen > #endif > #ifndef __aligned > #error you must define __aligned or bad things will happen > #endif > > Otherwise people may get compiled but very broken code > which most likely will be in critical things like device > drivers. I just noticed the -Wpacked warning. This can be used to detect unnecessary uses of __packed. __packed should only be used for historical or foreign poorly layed out structs. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message