<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:ismail.pazarbasi@gmail.com" title="Ismail Pazarbasi <ismail.pazarbasi@gmail.com>"> <span class="fn">Ismail Pazarbasi</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Incorrect processing of private inheritance"
href="http://llvm.org/bugs/show_bug.cgi?id=14298">bug 14298</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>ismail.pazarbasi@gmail.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Incorrect processing of private inheritance"
href="http://llvm.org/bugs/show_bug.cgi?id=14298#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Incorrect processing of private inheritance"
href="http://llvm.org/bugs/show_bug.cgi?id=14298">bug 14298</a>
from <span class="vcard"><a class="email" href="mailto:ismail.pazarbasi@gmail.com" title="Ismail Pazarbasi <ismail.pazarbasi@gmail.com>"> <span class="fn">Ismail Pazarbasi</span></a>
</span></b>
<pre>Clang handles this case correctly.
class_2 injected class name will be inherited by class_1 as well, but it will
be a private member in class_1 (and, hence, in class_0). In the declaration of
var_4, class_2 refers to this privately inherited injected class name. Class
scope will be looked up first, and a name will be found, but it will not be
accessible.
Use fully qualified name for class_2 to refer to class name in global
namespace.
struct class_0 : private class_1 {
struct ::class_2 var_4; // OK
};
The error message, however, could be improved. In this particular case, class_2
name is actually not a private member of class_2, but it's a private member in
class_1 because class_1 privately inherits names from class_2. Injected class
names are public members of classes.</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>