<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Can't implicitly cast from class with multiple inheritance to a base of a virtually base class if public inheritance follows after private or protected, but not before them"
   href="https://llvm.org/bugs/show_bug.cgi?id=28591">28591</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't implicitly cast from class with multiple inheritance to a base of a virtually base class if public inheritance follows after private or protected, but not before them
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.1
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>maxim.mishchenko@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre># version: clang-703.0.31, 
# sample.cpp

class foo {};
class foofoo: public foo {};
class private_bar: private virtual foofoo {};
class public_bar: public virtual foofoo {};
class foobar_public_first: public public_bar, public private_bar {};
class foobar_private_first: public private_bar, public public_bar {};

void test_foobar() {
    foo *foo1 = new foobar_public_first(); // OK
    foo *foo2 = new foobar_private_first(); // compile error - "Cannot cast
'foobar_private_first' to its private base class 'foo'"
}

So, availability of casting to base depends on how ancestor classes are ordered
in the inheritance list.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>