Author: sebor Date: Sat Jul 26 15:11:39 2008 New Revision: 680050 URL: http://svn.apache.org/viewvc?rev=680050&view=rev Log: 2008-07-26 Martin Sebor <[EMAIL PROTECTED]>
STDCXX-998 * src/assert.cpp (U_STACK_TRACE, __rw_stack_trace, printstack, __rw_assert_fail): Declared nothrow. Modified: stdcxx/branches/4.2.x/src/assert.cpp Modified: stdcxx/branches/4.2.x/src/assert.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/assert.cpp?rev=680050&r1=680049&r2=680050&view=diff ============================================================================== --- stdcxx/branches/4.2.x/src/assert.cpp (original) +++ stdcxx/branches/4.2.x/src/assert.cpp Sat Jul 26 15:11:39 2008 @@ -22,7 +22,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. * - * Copyright 1994-2006 Rogue Wave Software. + * Copyright 1994-2006 Rogue Wave Software, Inc. * **************************************************************************/ @@ -37,7 +37,7 @@ #ifdef __HP_aCC -extern "C" void U_STACK_TRACE (); +extern "C" void U_STACK_TRACE () _RWSTD_DECLARE_NOTHROW; # define STACK_TRACE U_STACK_TRACE @@ -47,8 +47,14 @@ _RWSTD_NAMESPACE (__rw) { +// declare with attribute((nothrow)) since the function calls +// others that may not be declared nothrow static void -__rw_stack_trace (int fd) +__rw_stack_trace (int fd) _RWSTD_DECLARE_NOTHROW; + + +static void +__rw_stack_trace (int fd) _RWSTD_DEFINE_NOTHROW { // limit stacktrace to the depth of 256 calls void* array [256]; @@ -70,7 +76,7 @@ // having to #define enabling macros (i.e., __EXTENSIONS__) and deal // with the breakage when using a strict compiler such as EDG eccp // with the long long extension (used in some system headers) disabled -extern "C" int printstack (int); +extern "C" int printstack (int) _RWSTD_DECLARE_NOTHROW; # define STACK_TRACE() printstack (2) #endif @@ -86,6 +92,7 @@ _RWSTD_EXPORT void __rw_assert_fail (const char *expr, const char *file, int line, const char *func) + _RWSTD_DEFINE_NOTHROW { // func may be 0 if the compiler doesn't support the ANSI C predefined // identifier `__func__' (see 6.4.2.2 of ISO/IEC 9899:1999) or an