<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 - __locale calls isascii, but MSVC doesn't seem to provide it in ctype.h"
href="https://bugs.llvm.org/show_bug.cgi?id=43456">43456</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__locale calls isascii, but MSVC doesn't seem to provide it in ctype.h
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rnk@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>If you compile a simple file that uses <iostream> on Windows and use libc++
headers, it works, but if you add -fno-ms-compatibility, you get errors like
this:
In file included from t.cpp:2:
In file included from
../../buildtools/third_party/libc++/trunk/include/iostream:37:
In file included from
../../buildtools/third_party/libc++/trunk/include/ios:215:
../../buildtools/third_party/libc++/trunk/include/__locale(636,19): error: use
of undeclared identifier 'isascii'; did you mean 'iswascii'?
if (!(isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m)))
^
../../third_party/depot_tools/win_toolchain/vs_files/418b3076791776573a815eb298c8aa590307af63/win_sdk/Include/10.0.18362.0/ucrt/corecrt_wctype.h(65,37):
note: 'iswascii' declared here
_Check_return_ _ACRTIMP int __cdecl iswascii (_In_ wint_t _C);
^
As a workaround, one can pass -D_CRT_DECLARE_NONSTDC_NAMES to the compiler to
get ctype.h to provide a definition of isascii. Ideally, libc++ would avoid
this out of the box.
See also issue 34330, which is the same thing but for newlib, which also
doesn't provide isascii out of the box.</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>