[llvm-bugs] [Bug 37923] New: Ill-formed code?

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 25 01:21:08 PDT 2018


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

            Bug ID: 37923
           Summary: Ill-formed code?
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zhonghao at pku.org.cn
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

The code is as follow:

template<typename T> __underlying_type(T) ft();
enum E {};
auto x = &ft<E>;

clang++ accepts the code, but g++ rejects it:

code2.c.cpp: In instantiation of '__underlying_type (T) ft() [with T = E]':
code2.c.cpp:1:43: sorry, unimplemented: mangling __underlying_type
 template<typename T> __underlying_type(T) ft();

Shall clang also reject the code?

-- 
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/20180625/f5279fa7/attachment-0001.html>


More information about the llvm-bugs mailing list