From owner-svn-src-head@freebsd.org Tue Jul 12 02:44:32 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 04C97B85CD5 for ; Tue, 12 Jul 2016 02:44:32 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-153.reflexion.net [208.70.211.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2A2C1012 for ; Tue, 12 Jul 2016 02:44:31 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 23488 invoked from network); 12 Jul 2016 02:44:24 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 12 Jul 2016 02:44:24 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.90.3) with SMTP; Mon, 11 Jul 2016 22:44:35 -0400 (EDT) Received: (qmail 9173 invoked from network); 12 Jul 2016 02:44:35 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 12 Jul 2016 02:44:35 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.0.105] (ip70-189-131-151.lv.lv.cox.net [70.189.131.151]) by iron2.pdx.net (Postfix) with ESMTPSA id 864B81C405F; Mon, 11 Jul 2016 19:44:23 -0700 (PDT) From: Mark Millard Subject: Re: svn commit: r302601 - in head/sys: arm/include arm64/include [__WCHAR_MAX definition mostly] Date: Mon, 11 Jul 2016 19:44:28 -0700 Message-Id: <46153340-D2F4-48BD-B738-4792BC25FA3F@dsl-only.net> Cc: Bruce Evans To: svn-src-head@freebsd.org, ache@FreeBSD.org, FreeBSD Current , freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Tue, 12 Jul 2016 02:44:32 -0000 https://lists.freebsd.org/pipermail/svn-src-head/2016-July/088998.html = shows: > Modified: head/sys/arm/include/_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/arm/include/_types.h Mon Jul 11 23:15:54 2016 = (r302600) > +++ head/sys/arm/include/_types.h Tue Jul 12 00:37:48 2016 = (r302601) > @@ -107,7 +107,7 @@ typedef __uint32_t __vm_size_t; > =20 > typedef unsigned int ___wchar_t; > #define __WCHAR_MIN 0 /* min value for a = wchar_t */ > -#define __WCHAR_MAX __UINT_MAX /* max value for a = wchar_t */ > +#define __WCHAR_MAX __INT_MAX /* max for a wchar_t <=3D = WINT_MAX */ > =20 > /* > * Unusual type definitions. >=20 > Modified: head/sys/arm64/include/_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/arm64/include/_types.h Mon Jul 11 23:15:54 2016 = (r302600) > +++ head/sys/arm64/include/_types.h Tue Jul 12 00:37:48 2016 = (r302601) > @@ -95,7 +95,7 @@ typedef __uint64_t __vm_size_t; > typedef unsigned int ___wchar_t; > =20 > #define __WCHAR_MIN 0 /* min value for a = wchar_t */ > -#define __WCHAR_MAX __UINT_MAX /* max value for a = wchar_t */ > +#define __WCHAR_MAX __INT_MAX /* max for a wchar_t <=3D = WINT_MAX */ > =20 > /* > * Unusual type definitions. My understanding of the criteria for __WCHAR_MIN and __WCHAR_MAX: A) __WCHAR_MIN and __WCHAR_MAX: same type as the integer promotion of = ___wchar_t (if that is distinct). B) __WCHAR_MIN is the low value for ___wchar_t as an integer type; not = necessarily a valid char value C) __WCHAR_MAX is the high value for ___wchar_t as an integer type; not = necessarily a valid char value (A) and (C) seem to be violated here for __WHAR_MAX if I'm right about = (A)-(C). [I'm not sure sure that (A)'s violation for __WCHAR_MIN here = matters much if I got that combination right.] As far as I know arm FreeBSD uses unsigned character types (of whatever = width). There is also at least one past example of Bruce Evans not objecting to = __UINT_MAX for __WCHAR_MAX for arm: https://lists.freebsd.org/pipermail/freebsd-arch/2012-June/012721.html = has his only comment being. . . > % +#ifdef __ARM_EABI__ > % +#define __WCHAR_MIN (0) >=20 > Bogus parentheses. >=20 > % +#define __WCHAR_MAX __UINT_MAX (The definitions were in a different file back then, leading to the = ifdef use.) You may want to check with Bruce Evans. He has good coverage of the = various standards to be covered (that may not all agree and how/what = FreeBSD then picks). =3D=3D=3D Mark Millard markmi at dsl-only.net