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: unassignedclangb...@nondot.org
          Reporter: sfi...@hotmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to