Hash: 22cc388e2b940608d4d759dc61c0335cfc621de1 (19 Oct 2020 master Output: configure && make make[2]: Entering directory '/home/jrs007/test-gcc/b-native/gdbserver' CXX server.o ../../binutils-gdb/gdbserver/server.cc: In function ‘void handle_general_set(char*)’: ../../binutils-gdb/gdbserver/server.cc:832:12: error: ‘sprintf’ argument 3 overlaps destination object ‘own_buf’ [-Werror=restrict] 832 | sprintf (own_buf, "E.Unknown thread-events mode requested: %s\n", | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 833 | mode); | ~~~~~ ../../binutils-gdb/gdbserver/server.cc:553:27: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here 553 | handle_general_set (char *own_buf) | ~~~~~~^~~~~~~
This works for me (gcc 9.3.0). What's your gcc version?
Fixed by simark in 4dbe16c8115
Thanks for fixing this. I wanted to confirm it is fixed and report back the gcc version for posterity. (In reply to Christian Biesinger from comment #1) > This works for me (gcc 9.3.0). What's your gcc version? $ gcc --version gcc (GCC) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.