<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Clang parser bug"
href="https://bugs.llvm.org/show_bug.cgi?id=43266">43266</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang parser bug
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</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>daniel.cooke@me.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Following fails to compile for Clang 8.0.0+
template<class L> struct mp_size;
struct __mpf_struct
{
int _mp_size;
};
struct X
{
__mpf_struct m_data[1];
void f()
{
if(((m_data)->_mp_size < 0 ? -1: (m_data)->_mp_size > 0) == 0)
{
}
}
};
$ clang++ -std=c++14 bug.cpp -o bug
bug.cpp:14:23: error: no template named '_mp_size'; did you mean 'mp_size'?
if(((m_data)->_mp_size < 0 ? -1: (m_data)->_mp_size > 0) == 0)
^~~~~~~~
mp_size
bug.cpp:1:26: note: 'mp_size' declared here
template<class L> struct mp_size;
^
bug.cpp:14:23: error: no member named '_mp_size' in '__mpf_struct'
if(((m_data)->_mp_size < 0 ? -1: (m_data)->_mp_size > 0) == 0)
~~~~~~~~ ^
2 errors generated.
Dans-MacBook-Pro:scratch dcooke$ clang++ -std=c++14 bug.cpp -o bug
bug.cpp:14:23: error: no template named '_mp_size'; did you mean 'mp_size'?
if(((m_data)->_mp_size < 0 ? -1: (m_data)->_mp_size > 0) == 0)
^~~~~~~~
mp_size
bug.cpp:1:26: note: 'mp_size' declared here
template<class L> struct mp_size;
^
bug.cpp:14:23: error: no member named '_mp_size' in '__mpf_struct'
if(((m_data)->_mp_size < 0 ? -1: (m_data)->_mp_size > 0) == 0)
~~~~~~~~ ^
2 errors generated.</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>