This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
set_new_handler does not throw
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Sat, 13 Jul 2002 22:11:04 +0200
- Subject: set_new_handler does not throw
The standard says that set_new_handler should be declared to not throw any
exceptions.
2002-07-13 Andreas Schwab <schwab@suse.de>
* libsupc++/new (set_new_handler): Declare to not throw any
exceptions.
* libsupc++/new_handler.cc (set_new_handler): Likewise.
--- libstdc++-v3/libsupc++/new.~1.10.~ 2002-04-16 10:17:52.000000000 +0200
+++ libstdc++-v3/libsupc++/new 2002-07-13 20:11:58.000000000 +0200
@@ -62,7 +62,7 @@ namespace std
* be of this type. */
typedef void (*new_handler)();
/// Takes a replacement handler as the argument, returns the previous handler.
- new_handler set_new_handler(new_handler);
+ new_handler set_new_handler(new_handler) throw();
} // namespace std
//@{
--- libstdc++-v3/libsupc++/new_handler.cc.~1.5.~ 2002-01-10 14:05:12.000000000 +0100
+++ libstdc++-v3/libsupc++/new_handler.cc 2002-07-13 20:12:25.000000000 +0200
@@ -37,7 +37,7 @@ using std::new_handler;
new_handler __new_handler;
new_handler
-std::set_new_handler (new_handler handler)
+std::set_new_handler (new_handler handler) throw()
{
new_handler prev_handler = __new_handler;
__new_handler = handler;
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."