[Bug c++/25635] New: [4.0/4.1/4.2 regression] Bogus cruft in error message for invalid operator declaration
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 2 12:59:00 GMT 2006
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
More information about the Gcc-bugs
mailing list