Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5832 closed Bugs (invalid)

Unable to clean compile Boost::Test (1.40.0) with GCC using -Weffc++

Reported by: noloader@… Owned by:
Milestone: To Be Determined Component: test
Version: Boost 1.40.0 Severity: Problem
Keywords: Cc:


Somewhat petty squawk, but were are full believers in using tools to locate problems at compile time. So our command line includes -Wall -Wextra -Woverloaded-virtual -Wreorder -Weffc++. Using -Weffc++ results in a non-virtual dtor warning for nil_t. Specifying -Wno-non-virtual-dtor with -Weffc++ has no effect. Boost appears to be collateral damage on this one.


PREVIOUS: struct nil_t { }

MODIFIED: struct nil_t {

explicit nil_t() { } virtual ~nil_t() { }


Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by Steven Watanabe

Component: Nonetest
Resolution: invalid
Status: newclosed

Sorry, but -Weffc++ is basically useless with Boost. It enforces conventions which are simply not applicable. Note that -Wnon-virtual-dtor is more limited than -Weffc++, since -Wnon-virtual-dtor only applies to polymorphic classes.

comment:2 Changed 6 years ago by John Maddock

(In [74984]) Merge recent bug fixes from Trunk. Refs #6014 Refs #5832 Refs #5934 Refs #6001 Refs #5982 Refs #5914 Refs #5927

Modify Ticket

Change Properties
Set your email in Preferences
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.