<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++ and g++ disagree on invalid definition of std::initializer_list"
href="https://bugs.llvm.org/show_bug.cgi?id=31946">31946</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang++ and g++ disagree on invalid definition of std::initializer_list
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>davide@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, filcab@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=17972" name="attach_17972" title="testcase">attachment 17972</a> <a href="attachment.cgi?id=17972&action=edit" title="testcase">[details]</a></span>
testcase
If I compile the testcase attached with clang, it builds fine.
gcc, instead, complains about an invalid initializer list.
$ clang++ -O2 /home/davide/work/game8/delta-reduced.c -std=gnu++11 -fpermissive
-frtti -fexceptions -fno-strict-aliasing -fms-extensions -w -g -std=gnu++11 -c
$ g++ -O2 /home/davide/work/game8/delta-reduced.c -std=gnu++11 -fpermissive
-frtti -fexceptions -fno-strict-aliasing -fms-extensions -w -g -std=gnu++11 -c
/home/davide/work/game8/delta-reduced.c:1093:9: error: template parameters not
deducible in partial specialization:
struct _Extent<_Ty[], _Nx>
^~~~~~~~~~~~~~~~~~~
/home/davide/work/game8/delta-reduced.c:1093:9: note: '_Ix'
/home/davide/work/game8/delta-reduced.c:1656:8: fatal error: definition of
std::initializer_list does not match #include <initializer_list>
class initializer_list
^~~~~~~~~~~~~~~~
Sorry for the large'ish testcase, but this is reduced from a much larger
testcase, and delta/creduce couldn't do better than this.</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>