[llvm-bugs] [Bug 41063] New: char8_t can't be mangled on Windows, but the feature-test macro is defined

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 13 19:10:13 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41063

            Bug ID: 41063
           Summary: char8_t can't be mangled on Windows, but the
                    feature-test macro is defined
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sfinae at hotmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Using Clang 8 RC5 on Windows, the char8_t feature-test macro is defined, but
the type is unusable, which defeats the purpose of feature-test macros:

C:\Temp>type meow.cpp
#include <stdio.h>

template <typename T>
    struct Meow { };

template <typename U>
    void woof(U) { }

int main() {
#ifdef __cpp_char8_t
    puts("__cpp_char8_t defined");
    Meow<char8_t> m;
    woof(m);
#else
    puts("__cpp_char8_t NOT defined");
#endif
}

C:\Temp>cl /EHsc /nologo /W4 /std:c++latest meow.cpp && meow
meow.cpp
__cpp_char8_t NOT defined

C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /Zc:char8_t meow.cpp && meow
meow.cpp
__cpp_char8_t defined

C:\Temp>clang-cl -m32 /EHsc /nologo /W4 /std:c++latest meow.cpp && meow
error: cannot mangle this built-in char8_t type yet
error: cannot mangle this built-in char8_t type yet
2 errors generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190314/fa3bf823/attachment.html>


More information about the llvm-bugs mailing list