This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold patch committed]: Add virtual destructor
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Fri, 27 Aug 2010 11:01:51 -0700
- Subject: [gold patch committed]: Add virtual destructor
Some versions of g++ warn about classes with virtual functions but no
virtual destructor. This warning triggers on Incremental_input_entry.
I committed this patch to mainline to avoid the warning.
Ian
2010-08-27 Ian Lance Taylor <iant@google.com>
* incremental.h (class Incremental_input_entry): Add virtual
destructor.
Index: incremental.h
===================================================================
RCS file: /cvs/src/src/gold/incremental.h,v
retrieving revision 1.12
diff -u -p -r1.12 incremental.h
--- incremental.h 12 Aug 2010 22:15:00 -0000 1.12
+++ incremental.h 27 Aug 2010 18:00:37 -0000
@@ -241,6 +241,10 @@ class Incremental_input_entry
: filename_key_(filename_key), offset_(0), info_offset_(0), mtime_(mtime)
{ }
+ virtual
+ ~Incremental_input_entry()
+ { }
+
// Return the type of input file.
Incremental_input_type
type() const