public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Cast the log10 argument to double to disambiguate it Date: Thu, 19 Dec 2019 21:21:00 -0000 [thread overview] Message-ID: <1cd4a20a27c430fdd0db8d5b154e9c7860e440f5@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 1cd4a20a27c430fdd0db8d5b154e9c7860e440f5 *** commit 1cd4a20a27c430fdd0db8d5b154e9c7860e440f5 Author: Christian Biesinger <cbiesinger@google.com> AuthorDate: Wed Dec 18 17:50:33 2019 -0600 Commit: Christian Biesinger <cbiesinger@google.com> CommitDate: Thu Dec 19 13:11:29 2019 -0600 Cast the log10 argument to double to disambiguate it 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. gdb/ChangeLog: 2019-12-19 Christian Biesinger <cbiesinger@google.com> * tui/tui-source.c (tui_source_window::set_contents): Cast argument of log10 to double to fix Solaris 11 with gcc 5.5. Change-Id: I6c0c52e9c172b529c899a435d430e5916aeef69f diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e0da79eda8..8595b6eafc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-12-19 Christian Biesinger <cbiesinger@google.com> + + * tui/tui-source.c (tui_source_window::set_contents): Cast argument of + log10 to double to fix Solaris 11 with gcc 5.5. + 2019-12-19 Christian Biesinger <cbiesinger@google.com> * fbsd-tdep.c (fbsd_info_proc_files_entry): Rename local var diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c index 32877d7bc8..6c3425fb89 100644 --- a/gdb/tui/tui-source.c +++ b/gdb/tui/tui-source.c @@ -85,7 +85,9 @@ tui_source_window::set_contents (struct gdbarch *arch, int digits = 0; if (compact_source) { - double l = log10 (offsets->size ()); + /* Solaris 11+gcc 5.5 has ambiguous overloads of log10, so we + cast to double to get the right one. */ + double l = log10 ((double) offsets->size ()); digits = 1 + (int) l; }
next reply other threads:[~2019-12-19 21:21 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-19 21:21 gdb-buildbot [this message] 2019-12-19 21:29 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, branch master gdb-buildbot 2019-12-19 21:41 ` Failures on Ubuntu-Aarch64-native-gdbserver-m64, " gdb-buildbot 2019-12-20 23:19 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2019-12-20 23:42 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2019-12-20 23:56 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2019-12-21 0:15 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2019-12-21 0:18 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot 2019-12-21 0:28 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2019-12-21 0:37 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1cd4a20a27c430fdd0db8d5b154e9c7860e440f5@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).