public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug build/26183] GDB build fails with error: ‘class std::basic_string_view<char>’ has no member named ‘to_string’
Date: Tue, 30 Jun 2020 13:55:50 +0000	[thread overview]
Message-ID: <bug-26183-4717-ST3ZYAPj94@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26183-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=26183

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5ac588997c3c2d032d5d5145d9245eb37354c23b

commit 5ac588997c3c2d032d5d5145d9245eb37354c23b
Author: Tom Tromey <tromey@adacore.com>
Date:   Tue Jun 30 07:53:03 2020 -0600

    Do not define basic_string_view::to_string

    gdb's copy of basic_string_view includes a to_string method.  However,
    according to cppreference, this is not a method on the real
    std::basic_string_view:

    https://en.cppreference.com/w/cpp/string/basic_string_view

    This difference matters because gdb_string_view.h will use the
    standard implementation when built with a C++17 or later.  This caused
    PR build/26183.

    This patch fixes the problem by changing the method to be a standalone
    helper function, and then rewriting the uses.  Tested by rebuilding
    with a version of GCC that defaults to C++17.

    (Note that the build still is not clean; and also I noticed that the
    libstdc++ string_view forbids the use of nullptr ... I wonder if gdb
    violates that.)

    gdb/ChangeLog
    2020-06-30  Tom Tromey  <tromey@adacore.com>

            PR build/26183:
            * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
            gdb::to_string.

    gdbsupport/ChangeLog
    2020-06-30  Tom Tromey  <tromey@adacore.com>

            PR build/26183:
            * gdb_string_view.h (basic_string_view::to_string): Remove.
            (gdb::to_string): New function.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2020-06-30 13:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 17:50 [Bug build/26183] New: " bergner at linux dot ibm.com
2020-06-29 17:51 ` [Bug build/26183] " bergner at linux dot ibm.com
2020-06-29 17:57 ` tuliom at ascii dot art.br
2020-06-29 18:04 ` bergner at linux dot ibm.com
2020-06-29 18:19 ` tromey at sourceware dot org
2020-06-29 18:28 ` bergner at linux dot ibm.com
2020-06-29 18:34 ` tromey at sourceware dot org
2020-06-29 18:35 ` tromey at sourceware dot org
2020-06-29 18:36 ` tromey at sourceware dot org
2020-06-29 18:50 ` simark at simark dot ca
2020-06-29 19:27 ` tromey at sourceware dot org
2020-06-30 13:55 ` cvs-commit at gcc dot gnu.org [this message]
2020-06-30 14:45 ` tromey at sourceware dot org

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=bug-26183-4717-ST3ZYAPj94@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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: link
Be 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).