Opened 11 years ago

Closed 11 years ago

Last modified 11 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:

Description

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.

/usr/include/boost/test/unit_test_suite.hpp:

PREVIOUS: struct nil_t { }

MODIFIED: struct nil_t {

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

};

Change History (2)

comment:1 by Steven Watanabe, 11 years ago

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 by John Maddock, 11 years ago

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

Note: See TracTickets for help on using tickets.