You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by fa...@apache.org on 2008/06/10 13:16:11 UTC

svn commit: r666064 - /stdcxx/branches/4.2.x/src/once.h

Author: faridz
Date: Tue Jun 10 04:16:11 2008
New Revision: 666064

URL: http://svn.apache.org/viewvc?rev=666064&view=rev
Log:
2008-06-10  Farid Zaripov  <fa...@epam.com>

	* src/once.h [_RWSTD_MSVC] (__rw_once): Added comment about exception specifications.

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=666064&r1=666063&r2=666064&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/once.h (original)
+++ stdcxx/branches/4.2.x/src/once.h Tue Jun 10 04:16:11 2008
@@ -140,6 +140,13 @@
 
 #else
 
+    // 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.
 _RWSTD_EXPORT int
 __rw_once (__rw_once_t*, void (*)() throw (...)) throw (...);