From owner-freebsd-stable@freebsd.org Tue Jul 12 03:58:08 2016 Return-Path: Delivered-To: freebsd-stable@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 591F2B925E7 for ; Tue, 12 Jul 2016 03:58:08 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB64015C3 for ; Tue, 12 Jul 2016 03:58:07 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f54.google.com with SMTP id b199so2388592lfe.0 for ; Mon, 11 Jul 2016 20:58:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=0nhk2KkMaPDyZ2vaCh68ir713TZduRu8jgFYJ3rUklI=; b=E8Ku5ElFxp7V/z+NLTk7dHRBYkzA2SwaMzajvCAqRpKtQDyFcBdhWjVrF1ArZWwHno nkVxhOHJBSUgo+/MoxBuHdVE2MSFsNBGFMrEC40KxpilT69lcishjmZb5+u35WqjFvnq RvIBnZXUWYw34ra45WKuO6IOvtNEWr68mZjWNmKqQ1yymcwqRHaRBt/uvL11KQoCFFQv r7qFfm4LtLrMqOI+2LeUWp9tVb41dSgYsDvAWzh2yH/SMY83EsFLt2Q2k2YYIWF1jdmc /q/d9enTx+1fJ7BtxQB1r5FSleiRdJHAb0F+TQ/kSEEnlvHY0MJDODytSuCCC7r9kxuv HaPQ== X-Gm-Message-State: ALyK8tIALrrfaVltEymENnM+aGqWTw6zlX5G+EJZ5re6nxvEA2Dztbx2V4MtFo/9SPpn5g== X-Received: by 10.25.38.213 with SMTP id m204mr22723lfm.107.1468295880295; Mon, 11 Jul 2016 20:58:00 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id r190sm1279323lfg.49.2016.07.11.20.57.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2016 20:57:59 -0700 (PDT) Subject: Re: svn commit: r302601 - in head/sys: arm/include arm64/include [__WCHAR_MAX definition mostly] To: Mark Millard , svn-src-head@freebsd.org, FreeBSD Current , freebsd-stable@freebsd.org References: <46153340-D2F4-48BD-B738-4792BC25FA3F@dsl-only.net> Cc: Bruce Evans From: Andrey Chernov Message-ID: Date: Tue, 12 Jul 2016 06:57:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <46153340-D2F4-48BD-B738-4792BC25FA3F@dsl-only.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 03:58:08 -0000 On 12.07.2016 5:44, Mark Millard wrote: > 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 It seems you are right about "not a valid char value", I'll back this change out. > As far as I know arm FreeBSD uses unsigned character types (of whatever > width). Probably it should be unsigned for other architectures too, clang does not generate negative values with L'' literals and locale use only positive values too.