Fix a couple -Wdeprecated-copy issues
authorPedro Alves <pedro@palves.net>
Mon, 7 Jun 2021 22:59:17 +0000 (23:59 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 7 Jun 2021 23:25:47 +0000 (00:25 +0100)
commit1b453aed8bf68b3a7d1865213ebcb96cda6a0ed9
tree105e603fa306b7329f3b0c4dfcafc57fb15564fc
parentfa6ec8efa4b902f65a8057b5ee3ba0da456ec8c2
Fix a couple -Wdeprecated-copy issues

Building GDB with current git (future 13) Clang runs into these two
issues:

#1:

 src/gdb/symtab.h:1139:3: error: definition of implicit copy assignment operator for 'symbol' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
   symbol (const symbol &) = default;
   ^

#2:

 src/gdb/dwarf2/read.c:834:23: error: definition of implicit copy constructor for 'partial_die_info' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
     partial_die_info& operator=(const partial_die_info& rhs) = delete;
       ^

Fix them by adding the explicit defaulted versions of copy ctor and
copy-assign op appropriately.

gdb/ChangeLog:
yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

* dwarf2/read.c (struct partial_die_info): Add defaulted copy
ctor.
* symtab.h (struct symbol): Add defaulted copy assignment
operator.
gdb/ChangeLog
gdb/dwarf2/read.c
gdb/symtab.h