[MacPorts] #40853: g++ 4.3 and 4.4 are broken wrt exception handling
MacPorts
noreply at macports.org
Wed Oct 23 05:11:50 PDT 2013
#40853: g++ 4.3 and 4.4 are broken wrt exception handling
-----------------------------+--------------------------------
Reporter: akim.demaille@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.0
Keywords: | Port: gcc43 gcc44
-----------------------------+--------------------------------
Hi,
First a disclaimer: I _think_ that this used to work before, but no longer
does. I tend to think that it used to work, because the test suite of
Bison was all green a few months back, but today there are fails because
of the following failure. It might have something to do with the libgcc
changes, but I could not find an "obsolete" machine on which I could check
this.
And also, I understand that these compilers are old.
On the following test case:
{{{
#include <iostream>
#include <stdexcept>
void foo()
{
try
{
throw std::runtime_error("foo");
}
catch (...)
{
std::cerr << "Inner caught" << std::endl;
throw;
}
}
int main()
{
try
{
foo();
}
catch (...)
{
std::cerr << "Outer caught unknown" << std::endl;
}
}
}}}
neither g++-mp-4.3 nor 4.4 produce a functioning executable:
{{{
$ g++-mp-4.3 exc.cc && ./a.out
Inner caught
zsh: abort ./a.out
$ g++-mp-4.4 exc.cc && ./a.out
Inner caught
zsh: abort ./a.out
$ g++-mp-4.5 exc.cc && ./a.out
Inner caught
Outer caught unknown
$ g++-mp-4.6 exc.cc && ./a.out
Inner caught
Outer caught unknown
$ g++-mp-4.7 exc.cc && ./a.out
Inner caught
Outer caught unknown
$ g++-mp-4.8 exc.cc && ./a.out
Inner caught
Outer caught unknown
$ g++-mp-4.9 exc.cc && ./a.out
Inner caught
Outer caught unknown
$ exc.cc && ./a.out
}}}
I'm using libgcc-devel, but trying with libgcc didn't change.
--
Ticket URL: <https://trac.macports.org/ticket/40853>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list