libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool, llvm-gcc, failing C++ exceptions


From: Ralf Wildenhues
Subject: Re: libtool, llvm-gcc, failing C++ exceptions
Date: Sun, 10 Jan 2010 09:12:45 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hi Bob,

* Bob Friesenhahn wrote on Sat, Jan 09, 2010 at 08:03:11PM CET:
> On Sat, 9 Jan 2010, Ralf Wildenhues wrote:
> >We can only find out better if we have small examples to look at.
> >Here is a proposed patch to try exception handling in libraries and
> >modules.  Tested with g++ on GNU/Linux; it will certainly need fixes
> >for other systems, and Libtool may as well.
> >
> >I'd appreciate a look over it for any obvious glitches, before I commit
> >it.
> 
> My main comment is that it would be useful if the thrown class is
> derived from std:exception (or one of its standard derived classes)
> in order to flush out any issues which may stem from possible
> partial template instantiation in libstdc++ (or pre-compiled
> headers) as well as in the test translation unit.

OK, sounds useful.  Would that entail more than just something like
this incremental addition?


diff --git a/tests/exceptions.at b/tests/exceptions.at
index d551cb8..77a94c1 100644
--- a/tests/exceptions.at
+++ b/tests/exceptions.at
@@ -29,7 +29,8 @@ AT_KEYWORDS([libltdl])
 CPPFLAGS="$LTDLINCL $CPPFLAGS"
 
 AT_DATA([module.h],
-[[class modexc { };
+[[#include <exception>
+class modexc : public std::exception { };
 extern "C" int modfoo () throw (modexc);
 ]])
 
@@ -57,7 +58,8 @@ int modfoo (void) throw (modexc)
 ]])
 
 AT_DATA([lib.h],
-[[class libexc { };
+[[#include <exception>
+class libexc : public std::exception { };
 int libfoo () throw (libexc);
 ]])
 
@@ -87,10 +89,11 @@ AT_DATA([main.cpp],
 [[#include <ltdl.h>
 #include <cstdlib>
 #include <iostream>
+#include <exception>
 #include "lib.h"
 #include "module.h"
 
-class exc { };
+class exc : public std::exception { };
 
 int foo (void) throw (exc)
 {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]