<html>
<head>
<base href="http://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 --- - Error about incomplete field is issued for typedef in incomplete class, but not for incomplete class itself"
href="http://llvm.org/bugs/show_bug.cgi?id=22838">22838</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error about incomplete field is issued for typedef in incomplete class, but not for incomplete class itself
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>yuri@tsoft.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>For the attached example c1-set.cpp, the following error is issued for the
field 'set<X>::iterator ii', because 'set<X>::iterator' is undefined:
<span class="quote">> error: field has incomplete type 'value_type' (aka 'X')
> note: definition of 'X' is not complete until the closing '}'</span >
PROBLEM#1: When 'ii' field is removed, compile succeeds, even though field
'set<X> mm' is also undefined. This is an inconsistent behavior.
PROBLEM#2: Replace 'set' with 'vector', and compile succeeds, even though
template-wise example is exactly the same, just the type of template container
is different. (see an attached case c1-vector.cpp which succeeds). This is
another inconsistent behavior.
gcc issues no such error, and this is more practically sound behavior, though I
am not sure how does it sit with the current C++ standard.
revision 231319 (~ current trunk)</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>