diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2012-11-07 13:20:33 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2012-11-07 13:20:33 +0000 |
commit | 54ba39f599fc2f3d59fd3cd828a301ce9b731a20 (patch) | |
tree | 5e8df8f8120799af6eda74296cbb619955ece69b /libstdc++-v3/src | |
parent | c501a38e3ac91a43e3fcd70b7b5dff116805389e (diff) | |
download | gcc-54ba39f599fc2f3d59fd3cd828a301ce9b731a20.tar.gz |
array (_GLIBCXX_THROW_OR_ABORT): Move...
2012-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* include/debug/array (_GLIBCXX_THROW_OR_ABORT): Move...
* include/bits/c++config: ... here.
* include/bits/shared_ptr_base.h (__throw_bad_weak_ptr): Use it.
* include/ext/pb_ds/exception.hpp: Likewise.
* include/ext/throw_allocator.h (__throw_forced_error): Likewise.
* include/ext/concurrence.h (__throw_concurrence_lock_error,
__throw_concurrence_unlock_error, __throw_concurrence_broadcast_error,
__throw_concurrence_wait_error): Likewise.
* include/tr1/shared_ptr.h (__throw_bad_weak_ptr): Likewise.
* include/tr1/functional (function<_Res(_ArgTypes...)>::operator()
(_ArgTypes...)): Likewise.
* libsupc++/eh_aux_runtime.cc (__cxxabiv1::__cxa_bad_cast,
__cxxabiv1::__cxa_bad_typeid): Likewise.
* libsupc++/vec.cc (compute_size): Likewise.
* libsupc++/new_op.cc (operator new (std::size_t)): Likewise.
* src/c++11/functexcept.cc: Likewise.
* testsuite/util/io/illegal_input_error.hpp
(__throw_illegal_input_error): Likewise.
* libsupc++/eh_personality.cc: Avoid warning with -fno-exceptions.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line
numbers.
* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
Likewise.
* testsuite/23_containers/array/tuple_interface/
tuple_element_debug_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
Likewise.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
From-SVN: r193295
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++11/functexcept.cc | 149 |
1 files changed, 38 insertions, 111 deletions
diff --git a/libstdc++-v3/src/c++11/functexcept.cc b/libstdc++-v3/src/c++11/functexcept.cc index 2fe14d532e0..687882b7fdd 100644 --- a/libstdc++-v3/src/c++11/functexcept.cc +++ b/libstdc++-v3/src/c++11/functexcept.cc @@ -1,5 +1,4 @@ -// Copyright (C) 2001, 2002, 2003, 2005, 2009, 2010 -// Free Software Foundation, Inc. +// Copyright (C) 2001-2012 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -44,151 +43,79 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#if __EXCEPTIONS void - __throw_bad_exception(void) - { throw bad_exception(); } + __throw_bad_exception() + { _GLIBCXX_THROW_OR_ABORT(bad_exception()); } void - __throw_bad_alloc(void) - { throw bad_alloc(); } + __throw_bad_alloc() + { _GLIBCXX_THROW_OR_ABORT(bad_alloc()); } void - __throw_bad_cast(void) - { throw bad_cast(); } + __throw_bad_cast() + { _GLIBCXX_THROW_OR_ABORT(bad_cast()); } void - __throw_bad_typeid(void) - { throw bad_typeid(); } + __throw_bad_typeid() + { _GLIBCXX_THROW_OR_ABORT(bad_typeid()); } void - __throw_logic_error(const char* __s) - { throw logic_error(_(__s)); } + __throw_logic_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(logic_error(_(__s))); } void - __throw_domain_error(const char* __s) - { throw domain_error(_(__s)); } + __throw_domain_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(domain_error(_(__s))); } void - __throw_invalid_argument(const char* __s) - { throw invalid_argument(_(__s)); } + __throw_invalid_argument(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(invalid_argument(_(__s))); } void - __throw_length_error(const char* __s) - { throw length_error(_(__s)); } + __throw_length_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(length_error(_(__s))); } void - __throw_out_of_range(const char* __s) - { throw out_of_range(_(__s)); } + __throw_out_of_range(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(out_of_range(_(__s))); } void - __throw_runtime_error(const char* __s) - { throw runtime_error(_(__s)); } + __throw_runtime_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(runtime_error(_(__s))); } void - __throw_range_error(const char* __s) - { throw range_error(_(__s)); } + __throw_range_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(range_error(_(__s))); } void - __throw_overflow_error(const char* __s) - { throw overflow_error(_(__s)); } + __throw_overflow_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(overflow_error(_(__s))); } void - __throw_underflow_error(const char* __s) - { throw underflow_error(_(__s)); } + __throw_underflow_error(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(underflow_error(_(__s))); } void - __throw_ios_failure(const char* __s) - { throw ios_base::failure(_(__s)); } + __throw_ios_failure(const char* __s __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(ios_base::failure(_(__s))); } void - __throw_system_error(int __i) - { throw system_error(error_code(__i, generic_category())); } + __throw_system_error(int __i __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(system_error(error_code(__i, + generic_category()))); } void - __throw_future_error(int __i) - { throw future_error(make_error_code(future_errc(__i))); } + __throw_future_error(int __i __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(future_error(make_error_code(future_errc(__i)))); } void __throw_bad_function_call() - { throw bad_function_call(); } + { _GLIBCXX_THROW_OR_ABORT(bad_function_call()); } void - __throw_regex_error(regex_constants::error_type __ecode) - { throw regex_error(__ecode); } -#else - void - __throw_bad_exception(void) - { std::abort(); } - - void - __throw_bad_alloc(void) - { std::abort(); } - - void - __throw_bad_cast(void) - { std::abort(); } - - void - __throw_bad_typeid(void) - { std::abort(); } - - void - __throw_logic_error(const char*) - { std::abort(); } - - void - __throw_domain_error(const char*) - { std::abort(); } - - void - __throw_invalid_argument(const char*) - { std::abort(); } - - void - __throw_length_error(const char*) - { std::abort(); } - - void - __throw_out_of_range(const char*) - { std::abort(); } - - void - __throw_runtime_error(const char*) - { std::abort(); } - - void - __throw_range_error(const char*) - { std::abort(); } - - void - __throw_overflow_error(const char*) - { std::abort(); } - - void - __throw_underflow_error(const char*) - { std::abort(); } - - void - __throw_ios_failure(const char*) - { std::abort(); } - - void - __throw_system_error(int) - { std::abort(); } - - void - __throw_future_error(int) - { std::abort(); } - - void - __throw_bad_function_call() - { std::abort(); } - - void - __throw_regex_error(regex_constants::error_type __ecode) - { std::abort(); } -#endif //__EXCEPTIONS + __throw_regex_error(regex_constants::error_type __ecode + __attribute__((unused))) + { _GLIBCXX_THROW_OR_ABORT(regex_error(__ecode)); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace |