aboutsummaryrefslogtreecommitdiff
path: root/gdb/ravenscar-thread.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-08-17 10:41:34 +0200
committerTom de Vries <tdevries@suse.de>2023-08-17 10:41:34 +0200
commit5bd5fecdd25eda1335796df8d77511f62bbd1898 (patch)
tree627442c62463ac83011a6b6489449536813699cd /gdb/ravenscar-thread.c
parent63b87362a5800890ccc5ca8494a9e0443472ef99 (diff)
downloadbinutils-5bd5fecdd25eda1335796df8d77511f62bbd1898.zip
binutils-5bd5fecdd25eda1335796df8d77511f62bbd1898.tar.gz
binutils-5bd5fecdd25eda1335796df8d77511f62bbd1898.tar.bz2
[gdb/build, c++20] Fix deprecated implicit capture of this
When building gdb with -std=c++20 I run into: ... gdb/ada-lang.c:10713:16: error: implicit capture of ‘this’ via ‘[=]’ is \ deprecated in C++20 [-Werror=deprecated] 10713 | auto do_op = [=] (LONGEST x, LONGEST y) | ^ gdb/ada-lang.c:10713:16: note: add explicit ‘this’ or ‘*this’ capture ... Fix this by using "[this]". Likewise in two more spots. Tested on x86_64-linux.
Diffstat (limited to 'gdb/ravenscar-thread.c')
-rw-r--r--gdb/ravenscar-thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index 5201613..68d336b 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -473,7 +473,7 @@ ravenscar_thread_target::update_thread_list ()
(m_base_ptid) and the running thread, that may not have been included
to system.tasking.debug's list yet. */
- iterate_over_live_ada_tasks ([=] (struct ada_task_info *task)
+ iterate_over_live_ada_tasks ([this] (struct ada_task_info *task)
{
this->add_thread (task);
});