This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 2/2] Make some dwarf_expr_context methods pure virtual

On 10/24/2016 02:36 PM, Tom Tromey wrote:
>>>>>> "Ulrich" == Ulrich Weigand <> 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]
 struct dwarf_expr_context

I'll add the "virtual" in a bit.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]