From patchwork Thu Dec 19 00:01:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 36954 Received: (qmail 120375 invoked by alias); 19 Dec 2019 00:01:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 120038 invoked by uid 89); 19 Dec 2019 00:01:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=farm X-HELO: mail-ua1-f73.google.com Received: from mail-ua1-f73.google.com (HELO mail-ua1-f73.google.com) (209.85.222.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Dec 2019 00:01:19 +0000 Received: by mail-ua1-f73.google.com with SMTP id 33so765221uaj.8 for ; Wed, 18 Dec 2019 16:01:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=1CBFXlM+STxMNiLvjANyuISwqGpC/aCYD9c0vEC82VE=; b=W3moNwUjzL5Ff17z5FbSs8cTp2pwkmLiRfD1AB3QosiHcUXzdFl7AjI6UGOphm9lU/ uZBWmHmO/8ANNBRpFQxaqRFIIlY9OyksixjUvfU05jUaNiJ08q2vYqOeCfQITnwCYgBl /PZgpymO35FaiKlkGeVxmRk0yhMyyokTrORbjeZng/Fvz3jgJ8jAQjyNXhkMHJLH9Gc7 R8f2MuPEOhi2RV80X/4Ca9onu4ULHEXKI16tdueEkvax+hTw2o59P0atZrEA0iTm4zBY 0o4liy0wb31DoTr2AFOaOYCzfPm8xadJCHdIrcn4T7101IettuHa5LNj+tnK2uvgZ4P6 L0Mw== Date: Wed, 18 Dec 2019 18:01:02 -0600 In-Reply-To: <20191219000103.36667-1-cbiesinger@google.com> Message-Id: <20191219000103.36667-4-cbiesinger@google.com> Mime-Version: 1.0 References: <20191219000103.36667-1-cbiesinger@google.com> Subject: [PATCH 2/3] Cast the log10 argument to double to disambiguate it X-Patchwork-Original-From: "Christian Biesinger via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Christian Biesinger To: gdb-patches@sourceware.org Cc: Christian Biesinger X-IsSubscribed: yes 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. Change-Id: I6c0c52e9c172b529c899a435d430e5916aeef69f --- gdb/tui/tui-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 32877d7bc8..1274e81674 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -85,7 +85,7 @@ tui_source_window::set_contents (struct gdbarch *arch, int digits = 0; if (compact_source) { - double l = log10 (offsets->size ()); + double l = log10 ((double) offsets->size ()); digits = 1 + (int) l; }