aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-04-14 10:37:30 +0800
committerTiezhu Yang <yangtiezhu@loongson.cn>2022-04-14 23:05:00 +0800
commit11d7dd3357997616427e22969ea8a929f5db59c9 (patch)
tree706326faaaf23b4224ef2332e4395c783e9fcbda /gdb/c-lang.c
parent75b2a443d515f531299ce1ed942810edd5bf5d84 (diff)
downloadgdb-11d7dd3357997616427e22969ea8a929f5db59c9.zip
gdb-11d7dd3357997616427e22969ea8a929f5db59c9.tar.gz
gdb-11d7dd3357997616427e22969ea8a929f5db59c9.tar.bz2
gdb: fix build errors in gdbsupport/thread-pool.h used with old gcc
When I build gdb with gcc 8.3, there exist the following build errors, rename the typedef to task_t to fix them. CXX thread-pool.o In file included from /home/loongson/gdb.git/gdbsupport/thread-pool.cc:21: /home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h: In member function ‘std::future<void> gdb::thread_pool::post_task(std::function<void()>&&)’: /home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:69:44: error: declaration of ‘task’ shadows a previous local [-Werror=shadow=local] std::packaged_task<void ()> task (std::move (func)); ^~~~ /home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:102:39: note: shadowed declaration is here typedef std::packaged_task<void ()> task; ^~~~ /home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h: In member function ‘std::future<_Res> gdb::thread_pool::post_task(std::function<T()>&&)’: /home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:80:41: error: declaration of ‘task’ shadows a previous local [-Werror=shadow=local] std::packaged_task<T ()> task (std::move (func)); ^~~~ /home/loongson/gdb.git/gdbsupport/../gdbsupport/thread-pool.h:102:39: note: shadowed declaration is here typedef std::packaged_task<void ()> task; ^~~~ Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Diffstat (limited to 'gdb/c-lang.c')
0 files changed, 0 insertions, 0 deletions