This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20576] poor diagnostic


------- Additional Comments From igodard at pacbell dot net  2005-03-21 12:39 -------
The same case but using derivation from classes rather than templates:

struct foo {};
struct bar : public foo {};
struct baz : public bar {};
struct baf : public foo, public baz {};
void F(foo&) {}
int main() { baf b; F(b); return 0; }


gives a much better diagnostic:

~/ootbc/members/src$ g++ foo.cc
foo.cc:4: warning: direct base `foo' inaccessible in `baf' due to ambiguity
foo.cc: In function `int main()':
foo.cc:6: error: `foo' is an ambiguous base of `baf'


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20576


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]