Bug 26758 - gdb master fails to build on Cygwin
Summary: gdb master fails to build on Cygwin
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 22:33 UTC by Joel Sherrill
Modified: 2020-10-22 22:16 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2020-10-19 22:33:52 UTC
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)
      |                     ~~~~~~^~~~~~~
Comment 1 Christian Biesinger 2020-10-20 12:20:33 UTC
This works for me (gcc 9.3.0). What's your gcc version?
Comment 2 Christian Biesinger 2020-10-21 15:08:49 UTC
Fixed by simark in 4dbe16c8115
Comment 3 Joel Sherrill 2020-10-22 22:16:16 UTC
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.