From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6498 invoked by alias); 9 Jun 2004 16:02:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6488 invoked by uid 48); 9 Jun 2004 16:02:46 -0000 Date: Wed, 09 Jun 2004 16:02:00 -0000 From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040609160242.15898.bangerth@dealii.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/15898] New: Error with templated operator delete not detected X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg01112.txt.bz2 List-Id: 3.7.3.2/2 specifically says that an operator delete that is a template shall have at least two function arguments. That makes sense, since the first one is fixed to be void*, so in order to deduce template arguments, we need at least a second function argument. However, as originally noted in PR 15890, this does not trigger an error: --------------- template < typename T > void operator delete ( void* raw ) {} int main() { char* a = new char; delete a; } --------------- All gcc versions simply accept this. W. -- Summary: Error with templated operator delete not detected Product: gcc Version: 3.5.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bangerth at dealii dot org CC: gcc-bugs at gcc dot gnu dot org,jkherciueh at gmx dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15898