From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17603 invoked by alias); 14 Sep 2006 01:16:07 -0000 Received: (qmail 17555 invoked by uid 48); 14 Sep 2006 01:15:58 -0000 Date: Thu, 14 Sep 2006 01:16:00 -0000 Subject: [Bug c++/29077] New: Incorrect error message for destructor in wrong namespace X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ian at airs dot com" 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 X-SW-Source: 2006-09/txt/msg01347.txt.bz2 List-Id: When I compile this C++ file with current mainline: class c { ~c(); }; namespace m { c::~c() { } } I get this error message: foo.cc:2: error: definition of ‘void c::c()’ is not in namespace enclosing ‘c’ This error is wrong: the definition in the wrong place is for c::~c(), not c::c(). -- Summary: Incorrect error message for destructor in wrong namespace Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ian at airs dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29077