Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2001 09:56:08 -0700
From:      Warner Losh <imp@harmony.village.org>
To:        "Jacques A. Vidrine" <n@nectar.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: portability sanity check 
Message-ID:  <200102211656.f1LGu8W97533@harmony.village.org>
In-Reply-To: Your message of "Wed, 21 Feb 2001 10:25:16 CST." <20010221102516.B93525@hamlet.nectar.com> 
References:  <20010221102516.B93525@hamlet.nectar.com>  <20010221094228.A93221@hamlet.nectar.com> <200102211553.f1LFrvs07412@billy-club.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20010221102516.B93525@hamlet.nectar.com> "Jacques A. Vidrine" writes:
: On Wed, Feb 21, 2001 at 08:53:57AM -0700, Warner Losh wrote:
: > The standard requires that (void *) &foo == (void *) &foo->s 
: 
: Thanks, that is what I was trying to track down but couldn't find it.
: I also thought that perhaps a structure has the same requirement
: alignments as its first member ... I think that means the same thing
: as you've stated.

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...

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102211656.f1LGu8W97533>