From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22147 invoked by alias); 29 May 2012 08:35:03 -0000 Received: (qmail 22044 invoked by uid 22791); 29 May 2012 08:35:02 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 May 2012 08:34:46 +0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/16166] -Weffc++ finer granularity Date: Tue, 29 May 2012 09:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg02695.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16166 --- Comment #5 from Jonathan Wakely 2012-05-29 08:34:32 UTC --- (In reply to comment #4) > * Item 11: Define a copy constructor and an assignment operator for classes > with dynamically allocated memory. > > -Wcopy-resource-class IMHO this warning should just go. With deleted copy ctor/assign and move ctor/assign there are even more places where a hard and fast rule isn't useful. > * Item 12: Prefer initialization to assignment in constructors. > > -Wassignment-in-constructor If I ever get my -Wmeminit patch working properly it would provide this. > * Item 14: Make destructors virtual in base classes. > > Already covered by -Wnon-virtual-dtor And the more useful -Wdelete-non-virtual-dtor > In summary, you could simulate exactly the behavior of -Weffc++ by turning on > each of these warnings individually, or you could turn on -Weffc++ and > selectively turn off a few warnings that you don't want. Yep, that would be much better