From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17070 invoked by alias); 18 Feb 2013 13:23:41 -0000 Received: (qmail 16782 invoked by uid 48); 18 Feb 2013 13:23:10 -0000 From: "akim.demaille at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56373] -Wzero-as-null-pointer-constant: does not catch issues with smart pointers Date: Mon, 18 Feb 2013 13:23: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: X-Bugzilla-Severity: minor X-Bugzilla-Who: akim.demaille at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 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: 2013-02/txt/msg01788.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56373 --- Comment #4 from Akim Demaille 2013-02-18 13:23:08 UTC --- > If you're smart enough to know the object isn't used then don't create it :) :) :) :) > ~shared_ptr() has non-trivial side-effects, the compiler isn't smart enough to > determine they won't fire when its empty, so it's always meaningful. I had in mind providing the library authors with an attribute that would help them influence this diagnostic.