From owner-svn-src-head@freebsd.org Sat Oct 22 14:00:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6FF0C1CF23; Sat, 22 Oct 2016 14:00:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C871CAD; Sat, 22 Oct 2016 14:00:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::f9cd:eb1b:c961:7062] (unknown [IPv6:2001:7b8:3a7:0:f9cd:eb1b:c961:7062]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 330CF13609; Sat, 22 Oct 2016 16:00:10 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_22889CC7-FD96-4BA8-83DC-1798341EBBA8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r307756 - in head: include sys/sys From: Dimitry Andric In-Reply-To: <20161022000056.GC95989@spindle.one-eyed-alien.net> Date: Sat, 22 Oct 2016 16:00:01 +0200 Cc: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0C5786D6-EB91-4762-9FAB-4C447EAB0AF8@FreeBSD.org> References: <201610212350.u9LNo2PT031675@repo.freebsd.org> <20161022000056.GC95989@spindle.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2016 14:00:13 -0000 --Apple-Mail=_22889CC7-FD96-4BA8-83DC-1798341EBBA8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 22 Oct 2016, at 02:00, Brooks Davis wrote: >=20 > On Fri, Oct 21, 2016 at 11:50:02PM +0000, John Baldwin wrote: >> Author: jhb >> Date: Fri Oct 21 23:50:02 2016 >> New Revision: 307756 >> URL: https://svnweb.freebsd.org/changeset/base/307756 >>=20 >> Log: >> Define max_align_t for C11. >>=20 >> libc++'s stddef.h includes an existing definition of max_align_t for >> C++11, but it is only defined for C++, not for C. In addition, GCC = and >> clang both define an alternate version of max_align_t that uses a >> union of multiple types rather than a plain long double as in = libc++. >> This adds a __max_align_t to that matches the GCC and >> clang definition that is mapped to max_align_t in . ... Modified: head/sys/sys/_types.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/sys/_types.h Fri Oct 21 21:55:50 2016 = (r307755) >> +++ head/sys/sys/_types.h Fri Oct 21 23:50:02 2016 = (r307756) >> @@ -100,6 +100,11 @@ typedef __uint_least32_t __char32_t; >> #define _CHAR32_T_DECLARED >> #endif >>=20 >> +typedef struct { >=20 > Should this be union per the commit message? You would be inclined to think so, but the strange way this is defined is only to be compatible with gcc's definition, which was introduced here in 2011: = https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/ginclude/stddef.h?r1=3D181048&r2= =3D181047&pathrev=3D181048 > Ideally I'd add a void * as well since that will support systems like > CHERI where pointers are the largest type. Is void * larger than a struct with long long and long double? I'd think this would be at least 128 bits on almost all architectures? In any case, if you want to change this definition, it is probably best to first check it with upstream gcc, otherwise you'll end up with an incompatibility. -Dimitry --Apple-Mail=_22889CC7-FD96-4BA8-83DC-1798341EBBA8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlgLcOkACgkQsF6jCi4glqMwaQCfSjtamAUoC7N1raA1m4KXJQ/h MgcAn22khZQ9Ou3ozpMGSm6LJoqOAWcE =nXwd -----END PGP SIGNATURE----- --Apple-Mail=_22889CC7-FD96-4BA8-83DC-1798341EBBA8--