From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124834 invoked by alias); 19 Dec 2019 19:11:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 124826 invoked by uid 89); 19 Dec 2019 19:11:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.3 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=wish X-HELO: mail-oi1-f196.google.com Received: from mail-oi1-f196.google.com (HELO mail-oi1-f196.google.com) (209.85.167.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Dec 2019 19:11:48 +0000 Received: by mail-oi1-f196.google.com with SMTP id a67so3505068oib.6 for ; Thu, 19 Dec 2019 11:11:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cSHFNeKIep6quxvtvlzj4Je9LgbFLIrrVcfCsSSZzME=; b=VfI5hg6FSdR74oiFIZFV9fcvconuhpVcxPSH5dtgurhK91hkUhklGuCTZrkZGSxRIP zeKLJ3rwC3Sv3am0t9V59ef9umhigX0EId+m3bTbOgh3OchEgInbk8DI8RrE/30Oegix WpEdb2FwsGFWJhiBtaVswrvPEtpGlFCd/FT/p79T1qRXYEyuUpKjitlYbFaOpD3Ucr1p G85F8k4lXys3qpGY7Og8aG2MyOSY1caJ/nyMFU1W6mIE1wey908kQgW0y3OqLtLvcyuo 8AaWGzCUjcwAZ2XNpkG9TkJt5QicC9FN/xgVULEet2cIAPrlyUQOyCBgMWFsMxOxwC86 ISSQ== MIME-Version: 1.0 References: <20191219000103.36667-1-cbiesinger@google.com> <20191219000103.36667-4-cbiesinger@google.com> <838sn92dja.fsf@gnu.org> <87r210b2o0.fsf@tromey.com> In-Reply-To: <87r210b2o0.fsf@tromey.com> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Thu, 19 Dec 2019 19:11:00 -0000 Message-ID: Subject: Re: [PATCH 2/3] Cast the log10 argument to double to disambiguate it To: Tom Tromey Cc: Eli Zaretskii , gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-12/txt/msg00831.txt.bz2 On Thu, Dec 19, 2019 at 12:17 PM Tom Tromey wrote: > > >>>>> "Eli" == Eli Zaretskii writes: > > >> Date: Wed, 18 Dec 2019 18:01:02 -0600 > >> From: "Christian Biesinger via gdb-patches" > >> Cc: Christian Biesinger > >> > >> On Solaris 11 with gcc 5.5.0 (gcc211 on the compile farm), math.h has a > >> using std::log10; directive. This is unfortunate because std::log10 has > >> overloads for float/double/long double. To disambiguate this call, > >> cast the argument to double to fix the build. > > Eli> We may wish to have a comment in the code referring to the original > Eli> problem, including perhaps the OS and the compiler versions? > Eli> Otherwise the need for this cast is not immediately obvious, IMO. > > Agreed; this is ok with that change. OK, will push with this comment: /* Solaris 11+gcc 5.5 has ambiguous overloads of log10, so we cast to double to get the right one. */ Christian