diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-12-30 00:10:05 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-12-30 00:10:17 -0500 |
commit | fc898b42e355fef58e6a029799fdd71b9dda5dc6 (patch) | |
tree | 80044e7c4d58acc8c9cb12b541dc993f8482bc73 /gdb/ChangeLog | |
parent | 0436426c7f7798b8eb4b48be9867495da8ef28f0 (diff) | |
download | gdb-fc898b42e355fef58e6a029799fdd71b9dda5dc6.zip gdb-fc898b42e355fef58e6a029799fdd71b9dda5dc6.tar.gz gdb-fc898b42e355fef58e6a029799fdd71b9dda5dc6.tar.bz2 |
Make mapped_debug_names and mapped_index final
When compiling with Clang 6, I see these warnings:
/home/emaisin/src/binutils-gdb/gdb/dwarf2read.c:25421:5: error: destructor called on non-final 'mapped_index' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
data->index_table->~mapped_index ();
^
In file included from /home/emaisin/src/binutils-gdb/gdb/dwarf2read.c:31:
In file included from /home/emaisin/src/binutils-gdb/gdb/defs.h:28:
In file included from /home/emaisin/src/binutils-gdb/gdb/common/common-defs.h:92:
In file included from /home/emaisin/src/binutils-gdb/gdb/common/gdb_unique_ptr.h:23:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/memory:81:
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/unique_ptr.h:76:2: error: delete called on non-final 'mapped_debug_names' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
delete __ptr;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/unique_ptr.h:236:4: note: in instantiation of member function 'std::default_delete<mapped_debug_names>::operator()' requested here
get_deleter()(__ptr);
^
/home/emaisin/src/binutils-gdb/gdb/dwarf2read.c:2374:21: note: in instantiation of member function 'std::unique_ptr<mapped_debug_names, std::default_delete<mapped_debug_names> >::~unique_ptr' requested here
dwarf2_per_objfile::dwarf2_per_objfile (struct objfile *objfile_,
^
This patch silences these warnings by making the classes final.
gdb/ChangeLog:
* dwarf2read.c (struct mapped_debug_names): Make final.
(struct mapped_index): Make final.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9cc060e..b94384b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-12-30 Simon Marchi <simon.marchi@ericsson.com> + + * dwarf2read.c (struct mapped_debug_names): Make final. + (struct mapped_index): Make final. + 2017-12-29 Simon Marchi <simon.marchi@ericsson.com> * common/diagnostics.h |