[Bug c++/16892] New: superfluous error message
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Fri Aug 6 02:00:00 GMT 2004
class B1 {
void Foo() {}
};
struct B2 {
void Foo() {}
}
struct D : public B1, public B2 {
void Bar() { Foo(); }
};
int main() {
D d;
return 0;
}
gets you:
foo.cc: In member function `void D::Bar()':
foo.cc:8: error: reference to `Foo' is ambiguous
foo.cc:5: error: candidates are: void B2::Foo()
foo.cc:2: error: void B1::Foo()
foo.cc:8: error: `Foo' undeclared (first use this function)
foo.cc:8: error: (Each undeclared identifier is reported only once for each function it appears in.)
foo.cc: At global scope:
foo.cc:9: error: multiple types in one declaration
The error on line 8 may or may not be an error (see bug #16891) but, the one reported on line 9 is bogus.
Ivan
--
Summary: superfluous error message
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
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16892
More information about the Gcc-bugs
mailing list