<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:aaron@aaronballman.com" title="Aaron Ballman <aaron@aaronballman.com>"> <span class="fn">Aaron Ballman</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Default to C11 standard and missing __STDC_NO_THREADS__ ( windows)"
href="https://bugs.llvm.org/show_bug.cgi?id=48704">bug 48704</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;">CC</td>
<td>
</td>
<td>aaron@aaronballman.com
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WONTFIX
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Default to C11 standard and missing __STDC_NO_THREADS__ ( windows)"
href="https://bugs.llvm.org/show_bug.cgi?id=48704#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Default to C11 standard and missing __STDC_NO_THREADS__ ( windows)"
href="https://bugs.llvm.org/show_bug.cgi?id=48704">bug 48704</a>
from <span class="vcard"><a class="email" href="mailto:aaron@aaronballman.com" title="Aaron Ballman <aaron@aaronballman.com>"> <span class="fn">Aaron Ballman</span></a>
</span></b>
<pre><span class="quote">> One day maybe Visual C++ will provide threads.h, so the most we can do is do the __has_include test internally in the compiler to power this macro.</span >
We really can't even do that much because 7.26.1p2 says: "Implementations that
define the macro __STDC_NO_THREADS__ need not provide this header nor support
any of its facilities."
Note how it doesn't say implementations that define the macro to a particular
value, just whether implementations define the macro at all.
The trouble is: Clang doesn't ship the full C implementation, it only ships the
compiler and the library portions that need to come from the compiler, which
does not include <threads.h>. We rely on the target platform to provide the
rest of the C standard library interfaces, so the compiler doesn't know whether
to define the macro or not. Some versions of glibc support <threads.h> and some
do not, no version of MSVC CRT supports <threads.h> currently, etc.
Users have to rely on the C standard library implementation to provide this
macro or not.</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>