[cfe-dev] Why in C++11 target -win32, char16_t disappears?
Yaron Keren
yaron.keren at gmail.com
Sun Oct 6 03:15:06 PDT 2013
I have tested Visual C++ 2013RC and indeed it does not define char16_t by
default.
However, if any C++ is header is included, including <cstdio>, char16_t
does gets defined through yvals.h.
This may be consistent with standards since char16_t is part of C++11 but
not C99 (may be part of C11).
So if we wish to exactly emulate VC behaviour clang is OK now but it is
inconsistent with the -std=c++11 switch. I'll see if this can be patched.
Yaron
2013/10/6 Yaron Keren <yaron.keren at gmail.com>
> Thanks, this indeed brings back char16_t.
>
> Since char16_t, char32_t are part of C++11 standard, shouldn't clang
> provide them when -stc=c++11 is specificed?
>
> Yaron
>
>
>
> 2013/10/6 Nico Rieck <nico.rieck at gmail.com>
>
>> On 05.10.2013 22:43, Yaron Keren wrote:
>>
>>> Trying to compile program in C++11 mode that uses char16_t fails [...]
>>>
>>
>> For whatever reason (probably because MSVC does not define those yet),
>> the char(16|32)_t keywords are not defined in MicrosoftMode. So you have to
>> compile with -fno-ms-compatibility for now.
>>
>> -Nico
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131006/60eb20f2/attachment.html>
More information about the cfe-dev
mailing list