From owner-freebsd-hackers Wed Feb 21 9: 8:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id D27E037B491 for ; Wed, 21 Feb 2001 09:08:32 -0800 (PST) (envelope-from nectar@nectar.com) Received: from hamlet.nectar.com (hamlet.nectar.com [10.0.1.102]) by gw.nectar.com (Postfix) with ESMTP id 7B04018C92; Wed, 21 Feb 2001 11:08:31 -0600 (CST) Received: (from nectar@localhost) by hamlet.nectar.com (8.11.2/8.9.3) id f1LH8VV93829; Wed, 21 Feb 2001 11:08:31 -0600 (CST) (envelope-from nectar@spawn.nectar.com) Date: Wed, 21 Feb 2001 11:08:31 -0600 From: "Jacques A. Vidrine" To: Warner Losh Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: portability sanity check Message-ID: <20010221110831.A93816@hamlet.nectar.com> Mail-Followup-To: "Jacques A. Vidrine" , Warner Losh , freebsd-hackers@FreeBSD.ORG References: <20010221102516.B93525@hamlet.nectar.com> <20010221094228.A93221@hamlet.nectar.com> <200102211553.f1LFrvs07412@billy-club.village.org> <20010221102516.B93525@hamlet.nectar.com> <200102211656.f1LGu8W97533@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102211656.f1LGu8W97533@harmony.village.org>; from imp@harmony.village.org on Wed, Feb 21, 2001 at 09:56:08AM -0700 X-Url: http://www.nectar.com/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Feb 21, 2001 at 09:56:08AM -0700, Warner Losh wrote: > There is some verbage in the structure layout part of the standard > that makes this a logical conclusion. > > However, it is overly tricky code. But then again to do the generic > sort of thing you want to do, you have to resort to C macros, or other > gross things to make it generic. The question becomes how do you do > that in the least gross way... Someone will say ``Use C++'' here. Then I will ignite a copy of `The Annotated C++ Reference Manual' and hit them with it. I think using unions is actually out of the question if you want to be able to allow new `types' after compile time. When you say ``resort to C macros,'' do you mean macros to hide the `type punning', or do you have something else in mind? Cheers, -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message