[llvm-bugs] [Bug 36327] New: make_exception_ptr of anom exception fails with Clang 6.0.0

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 9 12:04:01 PST 2018


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: unassignedclangbugs at nondot.org
          Reporter: jvapen at gmail.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180209/8e3d3776/attachment.html>


More information about the llvm-bugs mailing list