C++ exception not working

Home Forums Forum C++ exception not working

This topic contains 6 replies, has 2 voices, and was last updated by  uroni 8 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27958 Reply

    uroni

    Hi,

    with ellcc 0.1.27. Test program:

    #include <stdexcept>
    #include <iostream>
    
    int main()
    {
            try
            {
                    throw std::runtime_error("test");
            }
            catch(std::exception& e)
            {
                    std::cout << "Caught exception: " << e.what() << std::endl;
                    return 0;
            }
            return 1;
    }

    Exception is not caught. Could not see anything obivous missing.
    ecc++ -v -Wl,–verbose shows that it sets -fexceptions, -fcxx-exceptions and it is linked with libunwind.

    Thanks!

    #27983 Reply

    rich
    Keymaster

    Hi uroni,
    What processor are you building for?
    -Rich

    #28247 Reply

    uroni

    Sorry,

    didn’t work with the targets armv6-linux-engeabihf, x86_64-linux-eng and i386-linux-eng.

    LLVM doesn’t seem to use exceptions and nghttp2 only sparingly, so you might not have noticed.

    #76516 Reply

    Alexej Harm

    Hello,

    is this problem being worked on? C++ without exceptions is quite useless in a lot of scenarios.

    Is there a bugzilla or some other bug/issue management for ELLCC?

    If the problem won’t be addressed during the next 1-2 months, I could take a look at it and possibly help.

    Best regards,
    Alexej Harm

    #76775 Reply

    Alexej Harm

    This problem still persists in ELLCC 0.1.30.

    #77591 Reply

    Alexej Harm

    This problem still persists in ELLCC 0.1.33.

    #77601 Reply

    uroni

    @Alexej This is the bug Richard added with regard to this issue: http://ellcc.org/bugzilla/show_bug.cgi?id=78

    It’s probably not easy to fix because libunwind in llvm only works properly with Apple DWARF binaries, but documentation is a bit sparse.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: C++ exception not working
Your information: