This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24567] New: poor diagnostics
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2005 15:12:15 -0000
- Subject: [Bug c++/24567] New: poor diagnostics
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
int operator-(foo a, foo b) {}
struct bar {
int operator-(foo a, foo b) {}
};
gets you:
~/ootbc/members/src$ g++ foo.cc
foo.cc:1: error: declaration of `operator-' as non-function
foo.cc:1: error: `foo' was not declared in this scope
foo.cc:1: error: `foo' was not declared in this scope
foo.cc:1: error: expected `,' or `;' before '{' token
foo.cc:4: error: declaration of `operator-' as non-function
foo.cc:4: error: expected `;' before '(' token
foo.cc:5: error: expected `;' before '}' token
The undeclared names are not reported in the member function, and both produce
cascaded diagnostics.
--
Summary: poor diagnostics
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24567