Modify

Ticket #5832 (closed Bugs: invalid)

Opened 3 years ago

Last modified 3 years ago

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() { }

};

Attachments

Change History

comment:1 Changed 3 years ago by steven_watanabe

  • Status changed from new to closed
  • Resolution set to invalid
  • Component changed from None to test

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 3 years ago by johnmaddock

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.