This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 2/2] Make some dwarf_expr_context methods pure virtual
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 25 Oct 2016 14:22:37 +0100
- Subject: Re: [RFA 2/2] Make some dwarf_expr_context methods pure virtual
- Authentication-results: sourceware.org; auth=none
- References: <20161024122802.AE37B11C284@oc8523832656.ibm.com> <email@example.com>
On 10/24/2016 02:36 PM, Tom Tromey wrote:
>>>>>> "Ulrich" == Ulrich Weigand <firstname.lastname@example.org> writes:
> Ulrich> This seems to have broken my SPU daily build (running on RHEL 5 with a
> Ulrich> GCC 4.1 system compiler):
Any chance you could install the newer GCC from DTS on that machine?
Otherwise, if/when we go C++11, that builder will stop working.
> Ulrich> gdb/dwarf2expr.h:69: warning: 'struct dwarf_expr_context' has
> Ulrich> virtual functions but non-virtual destructor
> Ulrich> Is this a C++ version issue?
> I don't know. Adding a "virtual" to the destructor is safe though. I
> would do it but I'm traveling this week.
Looks like -Wnon-virtual-dtor was removed from (guessing) -Wall at some point.
With GCC 7 / trunk:
$ make WERROR_CFLAGS="-Wnon-virtual-dtor" dwarf2expr.o
In file included from .../src/gdb/dwarf2expr.c:28:0:
.../src/gdb/dwarf2expr.h:68:8: warning: ‘struct dwarf_expr_context’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
I'll add the "virtual" in a bit.