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

            Bug ID: 36327
           Summary: make_exception_ptr of anom exception fails with Clang
                    6.0.0
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: jva...@gmail.com
                CC: llvm-bugs@lists.llvm.org

When testing clang-cl 6.0.0-RC2, I got some compilation errors on code which
compiled with 5.0.0 and MSVC2015

========= t.cpp ===========
#include <exception>

namespace
{
   struct A : public std::exception
   {
   };
}

int main()
{
   std::make_exception_ptr(A{});
   return 0;
}
======== run.bat ==========

cl.exe /EHsc t.cpp /std:c++14
llvm_5_0_0\bin\clang-cl.exe -fms-compatibility-version=19 /EHsc t.cpp
/std:c++14

llvm_6_0_0-RC2\bin\clang-cl.exe -fms-compatibility-version=19 /EHsc t.cpp
/std:c++latest

======== result ===========
Vs2015\VC\INCLUDE\exception(369,27):  error: function
'std::__GetExceptionInfo<(anonymous namespace)::A>' is used but not
      defined in this translation unit, and cannot be defined in any other
translation unit because its type does not have linkage
template<class _Ex> void *__GetExceptionInfo(_Ex);
                          ^
Vs2015\VC\INCLUDE\exception(373,65):  note: used here
        return exception_ptr::_Copy_exception(_STD addressof(_Except),
__GetExceptionInfo(_Except));
                                                                       ^
1 error 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
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to