[llvm-bugs] [Bug 27587] New: Exceptions are not catched

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 30 08:48:39 PDT 2016


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

            Bug ID: 27587
           Summary: Exceptions are not catched
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bitteldany at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16286
  --> https://llvm.org/bugs/attachment.cgi?id=16286&action=edit
small project, 5 files

I create an object (constructor), which creates an object. Then calls a
function on the object "GetObject", which only throws an exception.
I cannot catch it, neither in object nor in main.

This is only reproducible in this exact way (see attached files).
G++ compiles and catches it fine. If I only use one header file it seems to
work aswell. If I inline the function it works also. But not this way.

Then there is #include <windows.h>, which might be related. It is //commented
right now, like this, it compiles fine, but the catch doesn't work.

If I un-comment it, it doesn't compile, it gives a "undefined reference to
'LoadJson::GetObjectA()' error.
The name of the function is "GetObject()".. without A.

I'm quite new to c++, let me know, if this is not supposed to work like this.

-- 
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/20160430/53242b84/attachment.html>


More information about the llvm-bugs mailing list