Opened 7 years ago

Closed 7 years ago

#3068 closed defect (fixed)

Add more g++ CXXFLAGS (-Wnon-virtual-dtor, etc.)

Reported by: muks Owned by: muks
Priority: medium Milestone: Sprint-20130820
Component: build system Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 2 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


The NetBSD builder is currently running an old version of GCC that does the equivalent of -Wnon-virtual-dtor by default. This causes it to fail compiles when the destructor is not virtual but there are virtual methods, but this does not happen on any of our development boxes.

This is a branch to add -Wnon-virtual-dtor by default and other useful warning CXXFLAGS.

I'm marking this as a defect, as we have seen this happening twice in the last week and one of them may have been a real issue.


Change History (6)

comment:1 Changed 7 years ago by muks

  • Status changed from new to reviewing

I also wanted to add things like:

  • -Wold-style-cast, but that has problems with system macros like CMSG_LEN() that use old style casting.
  • -Weffc++ but a lot of dependencies code fails with it.

So we just added -Wnon-virtual-dtor. Up for review.

comment:2 Changed 7 years ago by muks

  • Estimated Difficulty changed from 0 to 2

comment:3 Changed 7 years ago by muks

  • Milestone changed from Next-Sprint-Proposed to Sprint-20130820

comment:4 Changed 7 years ago by vorner

  • Owner changed from UnAssigned to vorner

comment:5 Changed 7 years ago by vorner

  • Owner changed from vorner to muks


It seems OK to merge.

comment:6 Changed 7 years ago by muks

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged to master branch in commit 35a7432feeb263c42eae96d6388729476f20b6f2:

* 649a0f8 [3068] Add -Wnon-virtual-dtor to CXXFLAGS when using GCC

Resolving as fixed. Thank you for the review Michal.

Note: See TracTickets for help on using tickets.