From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19915 invoked by alias); 14 May 2014 14:13:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 19887 invoked by uid 89); 14 May 2014 14:13:38 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lb0-f176.google.com Received: from mail-lb0-f176.google.com (HELO mail-lb0-f176.google.com) (209.85.217.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 14 May 2014 14:13:37 +0000 Received: by mail-lb0-f176.google.com with SMTP id p9so1458650lbv.21 for ; Wed, 14 May 2014 07:13:33 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.153.5.37 with SMTP id cj5mr2041580lad.48.1400076813806; Wed, 14 May 2014 07:13:33 -0700 (PDT) Received: by 10.112.125.202 with HTTP; Wed, 14 May 2014 07:13:33 -0700 (PDT) In-Reply-To: References: <537371EF.9080901@verizon.net> Date: Wed, 14 May 2014 14:13:00 -0000 Message-ID: Subject: Re: [PATCH, libstdc++/61166] overflow when parse number in std::duration operator"" From: Jonathan Wakely To: =?UTF-8?Q?Daniel_Kr=C3=BCgler?= Cc: Ed Smith-Rowland <3dw4rd@verizon.net>, gcc-patches , "libstdc++@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-05/txt/msg01087.txt.bz2 On 14 May 2014 14:59, Daniel Kr=C3=BCgler wrote: > 2014-05-14 15:38 GMT+02:00 Ed Smith-Rowland <3dw4rd@verizon.net>: >> Make the machinery in bits/parse_number.h unsigned long long. >> I had actually noticed this a while back but we were in stage 4. Then I >> forgot.. :-/ >> >> Built and tested on x84_64-linux. >> >> OK? > > I understand the reason why the corresponding static members value got > type unsigned long long, but why did the template parameter _Base also > require the same update? > > Another question: Presumably "value" indded requires no uglification, > but what about the member "valid"? I would expect that this is no name > reserved by the library. Good point. (It's a member function in at least , but we shouldn't be reserving it elsewhere). Any time I see a static const member of integral type called value I wonder if the type should derive from a specialization of std::integral_constant. You could probably also do: using __valid =3D true_type;