This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13590] [DR39] Non-existing ambiguity when inheriting through virtuals two identical using declarations.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 May 2014 19:15:36 +0000
- Subject: [Bug c++/13590] [DR39] Non-existing ambiguity when inheriting through virtuals two identical using declarations.
- Auto-submitted: auto-generated
- References: <bug-13590-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13590
--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Since I'm not sure if any of the examples here are meant to be accepted (some
definitely aren't) here's the example from the standard which should compile:
struct A { int x; }; // S(x,A) = { { A::x }, { A }}
struct B { float x; }; // S(x,B) = { { B::x }, { B }}
struct C: public A, public B { }; // S(x,C) = { invalid, { A in C, B in C } }
struct D: public virtual C { }; // S(x,D) = S(x,C)
struct E: public virtual C { char x; }; // S(x,E) = { { E::x }, { E }}
struct F: public D, public E { }; // S(x,F) = S(x,E)
int main() {
F f;
f.x = 0; // OK, lookup finds E::x
}