From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29220 invoked by alias); 2 Jan 2006 12:59:46 -0000 Received: (qmail 29195 invoked by uid 48); 2 Jan 2006 12:59:43 -0000 Date: Mon, 02 Jan 2006 12:59:00 -0000 Subject: [Bug c++/25635] New: [4.0/4.1/4.2 regression] Bogus cruft in error message for invalid operator declaration X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" 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-01/txt/msg00151.txt.bz2 List-Id: The diagnostic for the following invalid code snippet got worse with GCC 4.0.0: ============================================= struct A {}; A::operator int(); ============================================= We now issue a duplicate message and some more bogus stuff: bug.cc:3: error: no 'A::operator int()' member function declared in class 'A' bug.cc:3: error: no 'A::operator int()' member function declared in class 'A' bug.cc:3: error: 'A::operator int()' cannot be overloaded bug.cc:3: error: with 'A::operator int()' bug.cc:3: error: declaration of 'A::operator int()' outside of class is not definition We used to issue the following message which looks OK to me: bug.cc:3: error: no `A::operator int()' member function declared in class `A' bug.cc:3: error: declaration of `A::operator int()' outside of class is not definition For a normal member function like "void A::foo()" the error message is OK. -- Summary: [4.0/4.1/4.2 regression] Bogus cruft in error message for invalid operator declaration Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: diagnostic, monitored Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25635