[llvm-bugs] [Bug 35832] New: ambiguity accessing anonymous union member present in multiple bases despite explicit qualification
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jan 4 18:27:28 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=35832
Bug ID: 35832
Summary: ambiguity accessing anonymous union member present in
multiple bases despite explicit qualification
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: rjmccall at apple.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
harza:/tmp$ cat red.cpp
class B {
protected:
int i;
union { int j; };
};
class X : public B { };
class Y : public B { };
class Z : public X, public Y {
int a() { return X::i; } // works
int b() { return X::j; } // fails
};
harza:/tmp$ clang red.cpp
red.cpp:12:22: error: ambiguous conversion from derived class 'Z' to base class
'B':
class Z -> class X -> class B
class Z -> class Y -> class B
int b() { return X::j; } // fails
^
1 error generated.
Report by Dave Zarzycki!
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180105/9eb36066/attachment.html>
More information about the llvm-bugs
mailing list