public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Fix build bug in ada-lang.c
@ 2021-03-06 16:42 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2021-03-06 16:42 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

An earlier patch of mine introduced a build failure in ada-lang.c.  A
couple of "to_string" calls were not namespace-qualified.  In the
failing setup, the std string_view is being used, and so (apparently)
ADL doesn't find gdb::to_string.

This patch, from the bug, fixes the problem.

gdb/ChangeLog
2021-03-06  Chernov Sergey  <klen_s@mail.ru>

	PR gdb/27528:
	* ada-lang.c (ada_fold_name): Use gdb::to_string.
---
 gdb/ChangeLog  | 5 +++++
 gdb/ada-lang.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index bb50222f81c..8f27f3ccdf0 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -944,10 +944,10 @@ ada_fold_name (gdb::string_view name)
   static std::string fold_storage;
 
   if (!name.empty () && name[0] == '\'')
-    fold_storage = to_string (name.substr (1, name.size () - 2));
+    fold_storage = gdb::to_string (name.substr (1, name.size () - 2));
   else
     {
-      fold_storage = to_string (name);
+      fold_storage = gdb::to_string (name);
       for (int i = 0; i < name.size (); i += 1)
 	fold_storage[i] = tolower (fold_storage[i]);
     }
-- 
2.26.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-06 16:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 16:42 [pushed] Fix build bug in ada-lang.c Tom Tromey

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).