From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4403 invoked by alias); 11 Mar 2007 03:48:08 -0000 Received: (qmail 4350 invoked by uid 48); 11 Mar 2007 03:47:59 -0000 Date: Sun, 11 Mar 2007 03:48:00 -0000 Message-ID: <20070311034759.4349.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/29164] Overloaded operator delete[] doesn't get called In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fang at csl dot cornell dot edu" 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: 2007-03/txt/msg00925.txt.bz2 ------- Comment #9 from fang at csl dot cornell dot edu 2007-03-11 03:47 ------- In fact, I'm having trouble reproducing the problem when operator delete [] returns anything BUT NULL. It's as if, the actual call to operator delete [] is guarded by a NULL check. Now, if I'm RTHS (reading the holy standard) correctly, in [basic.stc.dynamic.deallocation] 3.7.4.2/3: "The value of the first argument supplied to a deallocation functions may be a null pointer value; if so, and if the deallocation function is one supplied in the standard library, the call has no effect." This seems to apply specifically to the standard library, but not necessarily non-standard implementations of the operator. Does that mean that the call to operator delete [] can be elided legally if the argument is NULL, or that the implementation of operator delete [] (NULL) is required to have no effect? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29164