https://bugs.llvm.org/show_bug.cgi?id=43456
Bug ID: 43456
Summary: __locale calls isascii, but MSVC doesn't seem to
provide it in ctype.h
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: r...@google.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs