stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r670734 - /stdcxx/branches/4.2.x/src/once.h
Date Mon, 23 Jun 2008 20:19:18 GMT
Author: sebor
Date: Mon Jun 23 13:19:18 2008
New Revision: 670734

URL: http://svn.apache.org/viewvc?rev=670734&view=rev
Log:
2008-06-23  Martin Sebor  <sebor@roguewave.com>

        * src/once.h: Corrected typos in comment and reworded.

Modified:
    stdcxx/branches/4.2.x/src/once.h

Modified: stdcxx/branches/4.2.x/src/once.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/once.h?rev=670734&r1=670733&r2=670734&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/once.h (original)
+++ stdcxx/branches/4.2.x/src/once.h Mon Jun 23 13:19:18 2008
@@ -140,13 +140,16 @@
 
 #else   // _RWSTD_MSVC && _RWSTD_REENTRANT
 
-    // MSVC by default assumes that C function doesn't throws any exception
-    // and issues warning "function assumed not to throw an exception but does".
-    // Explicitly specified exception specification resolves this problem
-    // Note: any C function, passed as parameter in __rw_once() also should be defined
-    // with appropriate exception specification if it throws an exception, to avoid
-    // resourse leaks due to not invoked destructors of automatic objects, located
-    // in this function.
+// MSVC by default assumes that functions with C linkage don't
+// throw exceptions and issues warning "function assumed not
+// to throw an exception but does". Specifying an exception
+// specification using the throw(...) extension prevents this
+// problem.
+// Note: functions with C linkage passed as an argument to
+// __rw_once() should also be declared with the appropriate
+// exception specification if it throws an exception in order
+// to avoid resource leaks due to destructors of objects with
+// auto storage duration not being run otherwise.
 _RWSTD_EXPORT int
 __rw_once (__rw_once_t*, void (*)() throw (...)) throw (...);
 



Mime
View raw message