[Bug c++/40918] uncaught_exception() returns wrong (inverted) value if some exception have crossed a DLL boundary before
dannysmith at users dot sourceforge dot net
gcc-bugzilla@gcc.gnu.org
Sun Aug 2 08:57:00 GMT 2009
------- Comment #5 from dannysmith at users dot sourceforge dot net 2009-08-02 08:57 -------
(In reply to comment #3)
> I'm linking using g++ driver, so shared libgcc is enabled by default in 4.4.0.
> I've just tried to enabled shared libstdc++ as described in the Release Notes
> to the MinGW GCC 4.4.0 release, which made no difference.
>
> More over, I modified the test case the following way: I got rid of std::cout
> in favor of printf(), added -nodefaultlibs option to the linker and specified
> all the required libraries manually. Now libstdc++ is not linked at all
> (neither static nor dynamic), the bug is still here.
>
I cannot comment on the build of libsdc++.dll in the mingw 4.4.0 release since
I have not looked at that source.
However, your revised testcase -- linking against a static libsupc++ -- would
be expected to fail. We can have only one instance of the eh_globals structure
defined in libsupc++/eh_globals.cc. This is accomplished by linking both the
.exe and the .dll against a shared libstdc++.
Applying Dave Korn's patch mentioned in Comment #2, and linking against
libstdc++.dll, I get this with your original testcaase:
Expecting 'true', got 'true'
Expecting 'false', got 'false'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40918
More information about the Gcc-bugs
mailing list