mirror of git://gcc.gnu.org/git/gcc.git
* eh_type.cc (__cxa_current_exception_type) Mark throw().
* unwind-cxx.h (__cxa_get_globals, __cxa_get_globals_fast): Mark const. (__cxa_get_exception_ptr): Mark pure. (__cxa_bad_cast, __cxa_bad_typeid): Mark noreturn (__terminate): Makr throw (). * exception (terminate): Mark throw(). (uncaught_exception): Mark pure. * eh_ptr.cc (_M_safe_bool_dummy): Mark throw(). * guard.cc (__cxa_guard_abort, __cxa_guard_release): Mark throw(). * eh_terminate.cc (__terminate, terminate): Mark throw(). * vec.cc (__cxa_vec_cleanup): Mark throw(). * cxxabi.h (__cxa_vec_cleanup, __cxa_guard_release, __cxa_guard_abort): Mark throw (). (__cxa_pure_virtual): Mark noreturn. (__cxa_current_exception_type): Mark throw and pure. * exception_ptr.h (operator ==, !=, _M_get, !, ==, __cxa_exception_type): Mark pure. (_M_safe_bool_dummy): Mark pure and const. From-SVN: r146331
This commit is contained in:
parent
5d51b87af4
commit
5cf217fff1
|
|
@ -1,3 +1,23 @@
|
||||||
|
2009-04-18 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* eh_type.cc (__cxa_current_exception_type) Mark throw().
|
||||||
|
* unwind-cxx.h (__cxa_get_globals, __cxa_get_globals_fast): Mark const.
|
||||||
|
(__cxa_get_exception_ptr): Mark pure.
|
||||||
|
(__cxa_bad_cast, __cxa_bad_typeid): Mark noreturn
|
||||||
|
(__terminate): Makr throw ().
|
||||||
|
* exception (terminate): Mark throw().
|
||||||
|
(uncaught_exception): Mark pure.
|
||||||
|
* eh_ptr.cc (_M_safe_bool_dummy): Mark throw().
|
||||||
|
* guard.cc (__cxa_guard_abort, __cxa_guard_release): Mark throw().
|
||||||
|
* eh_terminate.cc (__terminate, terminate): Mark throw().
|
||||||
|
* vec.cc (__cxa_vec_cleanup): Mark throw().
|
||||||
|
* cxxabi.h (__cxa_vec_cleanup, __cxa_guard_release, __cxa_guard_abort): Mark throw ().
|
||||||
|
(__cxa_pure_virtual): Mark noreturn.
|
||||||
|
(__cxa_current_exception_type): Mark throw and pure.
|
||||||
|
* exception_ptr.h (operator ==, !=, _M_get, !, ==,
|
||||||
|
__cxa_exception_type): Mark pure.
|
||||||
|
(_M_safe_bool_dummy): Mark pure and const.
|
||||||
|
|
||||||
2009-04-18 Jan Hubicka <jh@suse.cz>
|
2009-04-18 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
* src/pool_allocator.cc (_M_get_free_list, _M_get_mutex): Mark throw ()
|
* src/pool_allocator.cc (_M_get_free_list, _M_get_mutex): Mark throw ()
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ namespace __cxxabiv1
|
||||||
|
|
||||||
void
|
void
|
||||||
__cxa_vec_cleanup(void* __array_address, size_t __element_count,
|
__cxa_vec_cleanup(void* __array_address, size_t __element_count,
|
||||||
size_t __element_size, __cxa_cdtor_type destructor);
|
size_t __element_size, __cxa_cdtor_type destructor) _GLIBCXX_NOTHROW;
|
||||||
|
|
||||||
// Destruct and release array.
|
// Destruct and release array.
|
||||||
void
|
void
|
||||||
|
|
@ -121,14 +121,14 @@ namespace __cxxabiv1
|
||||||
__cxa_guard_acquire(__guard*);
|
__cxa_guard_acquire(__guard*);
|
||||||
|
|
||||||
void
|
void
|
||||||
__cxa_guard_release(__guard*);
|
__cxa_guard_release(__guard*) _GLIBCXX_NOTHROW;
|
||||||
|
|
||||||
void
|
void
|
||||||
__cxa_guard_abort(__guard*);
|
__cxa_guard_abort(__guard*) _GLIBCXX_NOTHROW;
|
||||||
|
|
||||||
// Pure virtual functions.
|
// Pure virtual functions.
|
||||||
void
|
void
|
||||||
__cxa_pure_virtual(void);
|
__cxa_pure_virtual(void) __attribute__ ((__noreturn__));
|
||||||
|
|
||||||
// Exception handling.
|
// Exception handling.
|
||||||
void
|
void
|
||||||
|
|
@ -567,13 +567,13 @@ namespace __cxxabiv1
|
||||||
// Returns the type_info for the currently handled exception [15.3/8], or
|
// Returns the type_info for the currently handled exception [15.3/8], or
|
||||||
// null if there is none.
|
// null if there is none.
|
||||||
extern "C" std::type_info*
|
extern "C" std::type_info*
|
||||||
__cxa_current_exception_type();
|
__cxa_current_exception_type() _GLIBCXX_NOTHROW __attribute__ ((__pure__));
|
||||||
|
|
||||||
// A magic placeholder class that can be caught by reference
|
// A magic placeholder class that can be caught by reference
|
||||||
// to recognize foreign exceptions.
|
// to recognize foreign exceptions.
|
||||||
class __foreign_exception
|
class __foreign_exception
|
||||||
{
|
{
|
||||||
virtual ~__foreign_exception() throw();
|
virtual ~__foreign_exception() _GLIBCXX_NOTHROW;
|
||||||
virtual void __pure_dummy() = 0; // prevent catch by value
|
virtual void __pure_dummy() = 0; // prevent catch by value
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ std::__exception_ptr::exception_ptr::_M_get() const throw()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
std::__exception_ptr::exception_ptr::_M_safe_bool_dummy()
|
std::__exception_ptr::exception_ptr::_M_safe_bool_dummy() throw ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
using namespace __cxxabiv1;
|
using namespace __cxxabiv1;
|
||||||
|
|
||||||
void
|
void
|
||||||
__cxxabiv1::__terminate (std::terminate_handler handler)
|
__cxxabiv1::__terminate (std::terminate_handler handler) throw ()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
handler ();
|
handler ();
|
||||||
|
|
@ -43,7 +43,7 @@ __cxxabiv1::__terminate (std::terminate_handler handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
std::terminate ()
|
std::terminate () throw()
|
||||||
{
|
{
|
||||||
__terminate (__terminate_handler);
|
__terminate (__terminate_handler);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace __cxxabiv1
|
||||||
// Returns the type_info for the currently handled exception [15.3/8], or
|
// Returns the type_info for the currently handled exception [15.3/8], or
|
||||||
// null if there is none.
|
// null if there is none.
|
||||||
extern "C"
|
extern "C"
|
||||||
std::type_info *__cxa_current_exception_type ()
|
std::type_info *__cxa_current_exception_type () throw()
|
||||||
{
|
{
|
||||||
__cxa_eh_globals *globals = __cxa_get_globals ();
|
__cxa_eh_globals *globals = __cxa_get_globals ();
|
||||||
__cxa_exception *header = globals->caughtExceptions;
|
__cxa_exception *header = globals->caughtExceptions;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ namespace std
|
||||||
|
|
||||||
/** The runtime will call this function if %exception handling must be
|
/** The runtime will call this function if %exception handling must be
|
||||||
* abandoned for any reason. It can also be called by the user. */
|
* abandoned for any reason. It can also be called by the user. */
|
||||||
void terminate() __attribute__ ((__noreturn__));
|
void terminate() throw() __attribute__ ((__noreturn__));
|
||||||
|
|
||||||
/// Takes a new handler function as an argument, returns the old function.
|
/// Takes a new handler function as an argument, returns the old function.
|
||||||
unexpected_handler set_unexpected(unexpected_handler) throw();
|
unexpected_handler set_unexpected(unexpected_handler) throw();
|
||||||
|
|
@ -112,7 +112,7 @@ namespace std
|
||||||
* 2: "When @c uncaught_exception() is true, throwing an %exception can
|
* 2: "When @c uncaught_exception() is true, throwing an %exception can
|
||||||
* result in a call of @c terminate() (15.5.1)."
|
* result in a call of @c terminate() (15.5.1)."
|
||||||
*/
|
*/
|
||||||
bool uncaught_exception() throw();
|
bool uncaught_exception() throw() __attribute__ ((__pure__));
|
||||||
|
|
||||||
// @} group exceptions
|
// @} group exceptions
|
||||||
} // namespace std
|
} // namespace std
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,10 @@ namespace std
|
||||||
namespace __exception_ptr
|
namespace __exception_ptr
|
||||||
{
|
{
|
||||||
bool
|
bool
|
||||||
operator==(const exception_ptr&, const exception_ptr&) throw();
|
operator==(const exception_ptr&, const exception_ptr&) throw() __attribute__ ((__pure__));
|
||||||
|
|
||||||
bool
|
bool
|
||||||
operator!=(const exception_ptr&, const exception_ptr&) throw();
|
operator!=(const exception_ptr&, const exception_ptr&) throw() __attribute__ ((__pure__));
|
||||||
|
|
||||||
class exception_ptr
|
class exception_ptr
|
||||||
{
|
{
|
||||||
|
|
@ -91,9 +91,9 @@ namespace std
|
||||||
void _M_addref() throw();
|
void _M_addref() throw();
|
||||||
void _M_release() throw();
|
void _M_release() throw();
|
||||||
|
|
||||||
void *_M_get() const throw();
|
void *_M_get() const throw() __attribute__ ((__pure__));
|
||||||
|
|
||||||
void _M_safe_bool_dummy();
|
void _M_safe_bool_dummy() throw() __attribute__ ((__const__));
|
||||||
|
|
||||||
friend exception_ptr std::current_exception() throw();
|
friend exception_ptr std::current_exception() throw();
|
||||||
friend void std::rethrow_exception(exception_ptr);
|
friend void std::rethrow_exception(exception_ptr);
|
||||||
|
|
@ -141,14 +141,14 @@ namespace std
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool operator!() const throw();
|
bool operator!() const throw() __attribute__ ((__pure__));
|
||||||
operator __safe_bool() const throw();
|
operator __safe_bool() const throw();
|
||||||
|
|
||||||
friend bool
|
friend bool
|
||||||
operator==(const exception_ptr&, const exception_ptr&) throw();
|
operator==(const exception_ptr&, const exception_ptr&) throw() __attribute__ ((__pure__));
|
||||||
|
|
||||||
const type_info*
|
const type_info*
|
||||||
__cxa_exception_type() const throw();
|
__cxa_exception_type() const throw() __attribute__ ((__pure__));
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace __exception_ptr
|
} // namespace __exception_ptr
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ namespace __cxxabiv1
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
void __cxa_guard_abort (__guard *g)
|
void __cxa_guard_abort (__guard *g) throw ()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_FUTEX
|
#ifdef _GLIBCXX_USE_FUTEX
|
||||||
// If __sync_* and futex syscall are supported, don't use any global
|
// If __sync_* and futex syscall are supported, don't use any global
|
||||||
|
|
@ -369,7 +369,7 @@ namespace __cxxabiv1
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
void __cxa_guard_release (__guard *g)
|
void __cxa_guard_release (__guard *g) throw ()
|
||||||
{
|
{
|
||||||
#ifdef _GLIBCXX_USE_FUTEX
|
#ifdef _GLIBCXX_USE_FUTEX
|
||||||
// If __sync_* and futex syscall are supported, don't use any global
|
// If __sync_* and futex syscall are supported, don't use any global
|
||||||
|
|
|
||||||
|
|
@ -148,8 +148,8 @@ struct __cxa_eh_globals
|
||||||
// either of the following functions. The "fast" version assumes at least
|
// either of the following functions. The "fast" version assumes at least
|
||||||
// one prior call of __cxa_get_globals has been made from the current
|
// one prior call of __cxa_get_globals has been made from the current
|
||||||
// thread, so no initialization is necessary.
|
// thread, so no initialization is necessary.
|
||||||
extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
|
extern "C" __cxa_eh_globals *__cxa_get_globals () throw() __attribute__ ((__const__));
|
||||||
extern "C" __cxa_eh_globals *__cxa_get_globals_fast () throw();
|
extern "C" __cxa_eh_globals *__cxa_get_globals_fast () throw() __attribute__ ((__const__));
|
||||||
|
|
||||||
// Allocate memory for the primary exception plus the thrown object.
|
// Allocate memory for the primary exception plus the thrown object.
|
||||||
extern "C" void *__cxa_allocate_exception(std::size_t thrown_size) throw();
|
extern "C" void *__cxa_allocate_exception(std::size_t thrown_size) throw();
|
||||||
|
|
@ -172,14 +172,14 @@ extern "C" void __cxa_throw (void *thrown_exception,
|
||||||
__attribute__((noreturn));
|
__attribute__((noreturn));
|
||||||
|
|
||||||
// Used to implement exception handlers.
|
// Used to implement exception handlers.
|
||||||
extern "C" void *__cxa_get_exception_ptr (void *) throw();
|
extern "C" void *__cxa_get_exception_ptr (void *) throw() __attribute__ ((__pure__));
|
||||||
extern "C" void *__cxa_begin_catch (void *) throw();
|
extern "C" void *__cxa_begin_catch (void *) throw();
|
||||||
extern "C" void __cxa_end_catch ();
|
extern "C" void __cxa_end_catch ();
|
||||||
extern "C" void __cxa_rethrow () __attribute__((noreturn));
|
extern "C" void __cxa_rethrow () __attribute__((noreturn));
|
||||||
|
|
||||||
// These facilitate code generation for recurring situations.
|
// These facilitate code generation for recurring situations.
|
||||||
extern "C" void __cxa_bad_cast ();
|
extern "C" void __cxa_bad_cast () __attribute__((__noreturn__));
|
||||||
extern "C" void __cxa_bad_typeid ();
|
extern "C" void __cxa_bad_typeid () __attribute__((__noreturn__));
|
||||||
|
|
||||||
// @@@ These are not directly specified by the IA-64 C++ ABI.
|
// @@@ These are not directly specified by the IA-64 C++ ABI.
|
||||||
|
|
||||||
|
|
@ -204,7 +204,7 @@ extern "C" void __cxa_end_cleanup (void);
|
||||||
|
|
||||||
// Invokes given handler, dying appropriately if the user handler was
|
// Invokes given handler, dying appropriately if the user handler was
|
||||||
// so inconsiderate as to return.
|
// so inconsiderate as to return.
|
||||||
extern void __terminate(std::terminate_handler) __attribute__((noreturn));
|
extern void __terminate(std::terminate_handler) throw () __attribute__((__noreturn__));
|
||||||
extern void __unexpected(std::unexpected_handler) __attribute__((noreturn));
|
extern void __unexpected(std::unexpected_handler) __attribute__((noreturn));
|
||||||
|
|
||||||
// The current installed user handlers.
|
// The current installed user handlers.
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ namespace __cxxabiv1
|
||||||
__cxa_vec_cleanup(void *array_address,
|
__cxa_vec_cleanup(void *array_address,
|
||||||
std::size_t element_count,
|
std::size_t element_count,
|
||||||
std::size_t element_size,
|
std::size_t element_size,
|
||||||
__cxa_cdtor_type destructor)
|
__cxa_cdtor_type destructor) throw()
|
||||||
{
|
{
|
||||||
if (destructor)
|
if (destructor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue