stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r666064 - /stdcxx/branches/4.2.x/src/once.h
Date Tue, 10 Jun 2008 11:16:11 GMT
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  <farid_zaripov@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 (...);
 



Mime
View raw message