From owner-freebsd-current@FreeBSD.ORG Fri Jun 10 09:45:51 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AFE816A41C for ; Fri, 10 Jun 2005 09:45:51 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B561D43D58 for ; Fri, 10 Jun 2005 09:45:50 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j5A9jmhW045285; Fri, 10 Jun 2005 12:45:48 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 43674-17; Fri, 10 Jun 2005 12:45:47 +0300 (EEST) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id j5A9jlbv045282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Jun 2005 12:45:47 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.3/8.13.3) id j5A9kFl4079630; Fri, 10 Jun 2005 12:46:15 +0300 (EEST) (envelope-from ru) Date: Fri, 10 Jun 2005 12:46:15 +0300 From: Ruslan Ermilov To: Dag-Erling Sm?rgrav , Joseph Koshy , current@freebsd.org Message-ID: <20050610094615.GC79474@ip.net.ua> References: <20050609234619.AD1F67306E@freebsd-current.sentex.ca> <84dead720506091950779d1661@mail.gmail.com> <86oeae3d8f.fsf@xps.des.no> <84dead72050610001675a32c19@mail.gmail.com> <863brq3bbz.fsf@xps.des.no> <84dead7205061001534b9385b3@mail.gmail.com> <863brqy41j.fsf@xps.des.no> <20050610091624.GA35628@wombat.fafoe.narf.at> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WChQLJJJfbwij+9x" Content-Disposition: inline In-Reply-To: <20050610091624.GA35628@wombat.fafoe.narf.at> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: Subject: Re: [current tinderbox] failure on ...all... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2005 09:45:51 -0000 --WChQLJJJfbwij+9x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 10, 2005 at 11:16:27AM +0200, Stefan Farfeleder wrote: > On Fri, Jun 10, 2005 at 11:06:16AM +0200, Dag-Erling Sm?rgrav wrote: > > Joseph Koshy writes: > > > Dag-Erling Sm?rgrav writes: > > > > It also seems strange to me that you on the one hand introduce a > > > > new struct to separate MD and MI interfaces, and on the other hand > > > > continue to assume that they are assignment-compatible. > > > I'd be very surprised if two C structures with identical definitions > > > were not assignment compatible. > >=20 > > I wouldn't be surprised if the standard says they aren't. > > Unfortunately, my copy is at home. >=20 > Do you mean the following? >=20 > struct t1 { int a; } x; > struct t2 { int a; } y =3D { 42 }; > x =3D y; >=20 > The types `struct t1' and `struct t2' are not compatible and thus not > assignable. See 6.2.7 and 6.5.16.1. >=20 If you're to byte-copy say t1 to t2, is it guaranteed to work? That is, do both types are guaranteed to have the same size and alignment of their structure members? I'm pretty sure this is guaranteed, as lot of code assumes this, for example, the sockaddr* structures. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --WChQLJJJfbwij+9x Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCqWFnqRfpzJluFF4RApckAJwNn4pT5xNv5MmaOKZfKA9Q4YJDvQCfZ3Ed 3IHtCOLnzueEsmwmHM1fqNM= =Cpmf -----END PGP SIGNATURE----- --WChQLJJJfbwij+9x--