From owner-svn-src-all@FreeBSD.ORG Tue Dec 25 08:16:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7802454; Tue, 25 Dec 2012 08:16:01 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by mx1.freebsd.org (Postfix) with ESMTP id 798B38FC12; Tue, 25 Dec 2012 08:16:00 +0000 (UTC) Received: from mxin3-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0MFK002YBUYHOS20@smtp5.clear.net.nz>; Tue, 25 Dec 2012 21:16:00 +1300 (NZDT) Received: from 202-0-48-19.paradise.net.nz (HELO localhost) ([202.0.48.19]) by smtpin32.paradise.net.nz with ESMTP; Tue, 25 Dec 2012 21:15:59 +1300 Date: Tue, 25 Dec 2012 21:15:47 +1300 From: Andrew Turner Subject: Re: svn commit: r244673 - head/contrib/libstdc++/include/std In-reply-to: <201212250737.qBP7bYeh011465@svn.freebsd.org> To: src-committers@freebsd.org Message-id: <20121225211547.63d42295@fubar.geek.nz> MIME-version: 1.0 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Pirate: Arrrr References: <201212250737.qBP7bYeh011465@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Dec 2012 08:16:01 -0000 On Tue, 25 Dec 2012 07:37:34 +0000 (UTC) Andrew Turner wrote: > Author: andrew > Date: Tue Dec 25 07:37:33 2012 > New Revision: 244673 > URL: http://svnweb.freebsd.org/changeset/base/244673 > > Log: > Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t. This should say: Fix the __glibcxx_min and __glibcxx_max macros for an unsigned wchar_t. The left shift's in the original version cause GCC to issue a warning: warning: left shift count >= width of type > > * The __glibcxx_max macro came from GCC svn r138078, the last GPLv2 > revision of this file. > * I wrote the updated __glibcxx_min macro. > > Modified: > head/contrib/libstdc++/include/std/std_limits.h > > Modified: head/contrib/libstdc++/include/std/std_limits.h > ============================================================================== > --- head/contrib/libstdc++/include/std/std_limits.h Tue Dec 25 > 07:29:25 2012 (r244672) +++ > head/contrib/libstdc++/include/std/std_limits.h Tue Dec 25 > 07:37:33 2012 (r244673) @@ -134,10 +134,11 @@ #define > __glibcxx_signed(T) ((T)(-1) < 0) > #define __glibcxx_min(T) \ > - (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0) > + (__glibcxx_signed (T) ? (((T)1 << (__glibcxx_digits (T) - 1)) << > 1) : (T)0) > #define __glibcxx_max(T) \ > - (__glibcxx_signed (T) ? ((T)1 << __glibcxx_digits (T)) - 1 : ~(T)0) > + (__glibcxx_signed (T) ? \ > + (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) > > #define __glibcxx_digits(T) \ > (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) > >