#5832 closed Bugs (invalid)
Unable to clean compile Boost::Test (1.40.0) with GCC using -Weffc++
Reported by: | 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)
Note:
See TracTickets
for help on using tickets.
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.