public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Don't use auto for lambda parameter
@ 2022-11-28 19:44 Hannes Domani
  0 siblings, 0 replies; only message in thread
From: Hannes Domani @ 2022-11-28 19:44 UTC (permalink / raw)
  To: gdb-cvs

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

commit 23d04cffa847ab39e259ad262526f66d4fad1874
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Mon Nov 28 19:32:43 2022 +0100

    Don't use auto for lambda parameter
    
    Older gcc versions (here 4.9.2) can't handle auto for a lambda parameter:
    
    ../../gdb/windows-nat.c: In member function 'void windows_nat_target::delete_thread(ptid_t, DWORD, bool)':
    ../../gdb/windows-nat.c:629:12: error: use of 'auto' in lambda parameter declaration only available with -std=c++1y or -std=gnu++1y [-Werror]
            [=] (auto &th)
                ^

Diff:
---
 gdb/windows-nat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index f61f6c1cb35..6da6757acaf 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -631,7 +631,7 @@ windows_nat_target::delete_thread (ptid_t ptid, DWORD exit_code,
 
   auto iter = std::find_if (windows_process.thread_list.begin (),
 			    windows_process.thread_list.end (),
-			    [=] (auto &th)
+			    [=] (std::unique_ptr<windows_thread_info> &th)
 			    {
 			      return th->tid == id;
 			    });

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

only message in thread, other threads:[~2022-11-28 19:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 19:44 [binutils-gdb] Don't use auto for lambda parameter Hannes Domani

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