From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12308 invoked by alias); 17 Apr 2014 16:38:57 -0000 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 Received: (qmail 12277 invoked by uid 48); 17 Apr 2014 16:38:54 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58114] allow turning the warning about deleting a pointer of incomplete type into an error Date: Thu, 17 Apr 2014 16:38: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-Version: 4.7.2 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg01303.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58114 --- Comment #5 from Jonathan Wakely --- That change would force compilers to reject currently valid programs that have well-defined behaviour. Changes that like are not popular. It is valid in C to pass a pointer to an incomplete type to free(), and this C++ rule is compatible. You can delete incomplete types if they have trivial destructors (like C structs).