[gdb/build, c++20] Fix deprecated implicit capture of this
authorTom de Vries <tdevries@suse.de>
Thu, 17 Aug 2023 08:41:34 +0000 (10:41 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 17 Aug 2023 08:41:34 +0000 (10:41 +0200)
commit5bd5fecdd25eda1335796df8d77511f62bbd1898
tree627442c62463ac83011a6b6489449536813699cd
parent63b87362a5800890ccc5ca8494a9e0443472ef99
[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.
gdb/ada-lang.c
gdb/ravenscar-thread.c
gdb/remote.c