From patchwork Tue Apr 28 12:47:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Glisse X-Patchwork-Id: 465551 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C3AFE14016A for ; Tue, 28 Apr 2015 22:47:56 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=GS3W4dzr; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=PA6rmG8AqA6ofvtUoh0tfh7zktBU0bbeKA/u4Sa7ttpMkulLuXjuG Y493jBoa8CBJeI2L1wl/0KGzzLIhJJtPcJxNkKiBFRqR4K0GEiTCVGkUdjamvf93 xDhNDOEJxhq8j3Z7698Qs6nJoMrLq7snn29pUcUIXaT6bszn+i9xA4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=d2ZO6EZZ0fI9UI/KsPN/nRFDhWU=; b=GS3W4dzrmrqHShMZPl8G ytrajssH1DMpbrmMqgmqr4zMfaF5xu1esLG9tNGFAt9Z1tJl4XNP1y7atLCYIO0P jAj+MBlRIhaOe3d7xLJvMdG1s9P3Uw3qlJtf27S1Qb1XS3+49q2gAL8r2i449WkK OG/Er2zSnKOJDxi9yPwDjaA= Received: (qmail 43991 invoked by alias); 28 Apr 2015 12:47:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 43579 invoked by uid 89); 28 Apr 2015 12:47:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail2-relais-roc.national.inria.fr Received: from mail2-relais-roc.national.inria.fr (HELO mail2-relais-roc.national.inria.fr) (192.134.164.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 28 Apr 2015 12:47:45 +0000 Received: from stedding.saclay.inria.fr (HELO stedding) ([193.55.250.194]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 28 Apr 2015 14:47:42 +0200 Received: from glisse (helo=localhost) by stedding with local-esmtp (Exim 4.84) (envelope-from ) id 1Yn4vN-0001jc-QQ; Tue, 28 Apr 2015 14:47:41 +0200 Date: Tue, 28 Apr 2015 14:47:41 +0200 (CEST) From: Marc Glisse To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: PR libstdc++/65883 missing unsigned in numeric_limits Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Hello, this patch fixes an obvious typo. Regtested without problem, and I manually checked that the new return value of max() makes more sense. 2015-04-28 Marc Glisse PR libstdc++/65883 * include/std/limits (numeric_limits): Add missing unsigned. Index: include/std/limits =================================================================== --- include/std/limits (revision 222524) +++ include/std/limits (working copy) @@ -1483,21 +1483,22 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION \ template<> \ struct numeric_limits \ { \ static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ min() _GLIBCXX_USE_NOEXCEPT { return 0; } \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ - max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \ + max() _GLIBCXX_USE_NOEXCEPT \ + { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \ \ UEXT \ \ static _GLIBCXX_USE_CONSTEXPR int digits \ = BITSIZE; \ static _GLIBCXX_USE_CONSTEXPR int digits10 \ = BITSIZE * 643L / 2136; \ static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \ static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \ static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \