From 50a681c4ee5933c5a561620c7df36716f39374bb Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 18 Apr 2009 23:19:18 +0200 Subject: [PATCH] condition_variable.cc (condition_variable, [...]): Mark throw() * src/condition_variable.cc (condition_variable, condition_variable_any constructors): Mark throw() * src/hash.cc (operator() for long double, string, and wstring): Mark throw (). * src/strstream.cc (strstreambuf constructors, freeze, str, pcount, _M_setup, rdbuf, str): Mark throw (). * src/chrono.cc (new): Mark throw (). * include/std/system_error (system_category, generic_category): Mark throw () and const. * include/std/chrono (now): Mark throw (). * include/std/condition_variable (condition_variable, ~condition_variable, condition_variable_any, ~condition_variable_any): Mark throw (). * include/std/mutex (mutex): Mark throw (). * include/bits/stl_list.h (swap, transfer, reverse, hook, unhook): Mark throw. * include/bits/functional_hash.h (operator() on size_t): Mark pure and throw (). * include/bits/locale_facets.tcc (__verify_grouping): Mark pure. * include/bits/locale_classes.h (_S_initialize_once, _S_clone_c_locale): Mark throw (). (_S_get_c_name): Mark const and throw (). (_M_id, _M_compare, _M_transform, _M_compare, _M_transform): Mark throw (). * include/bits/locale_facets.h (__convert_to_v explicit instances): Mark throw (). (_M_convert_to_wmask, _M_initialize_ctype, _S_format_float): Mark throw (). * include/bits/ios_base.h (_M_dispose_callbacks, _M_init, imbue, ios_base): Mark throw () * include/bits/locale_facets_nonio.h (_M_put): Mark throw. * include/backward/strstream (strstreambuf constructors): Mark throw (). (str, freeze, _M_setupf): Mark throw (). (pcount): Mark pure and throw (). (rdbuf): Mark const and throw (). From-SVN: r146328 --- libstdc++-v3/ChangeLog | 35 ++++++++++++++++ libstdc++-v3/include/backward/strstream | 40 +++++++++---------- libstdc++-v3/include/bits/c++config | 8 ++++ libstdc++-v3/include/bits/functional_hash.h | 4 +- libstdc++-v3/include/bits/ios_base.h | 8 ++-- libstdc++-v3/include/bits/locale_classes.h | 22 +++++----- libstdc++-v3/include/bits/locale_classes.tcc | 4 +- libstdc++-v3/include/bits/locale_facets.h | 12 +++--- libstdc++-v3/include/bits/locale_facets.tcc | 4 +- .../include/bits/locale_facets_nonio.h | 10 ++--- libstdc++-v3/include/bits/stl_list.h | 10 ++--- .../include/c_compatibility/stdatomic.h | 6 +-- libstdc++-v3/include/std/chrono | 2 +- libstdc++-v3/include/std/condition_variable | 8 ++-- libstdc++-v3/include/std/mutex | 2 +- libstdc++-v3/include/std/system_error | 4 +- libstdc++-v3/src/chrono.cc | 2 +- libstdc++-v3/src/condition_variable.cc | 8 ++-- libstdc++-v3/src/hash.cc | 10 ++--- libstdc++-v3/src/strstream.cc | 40 +++++++++---------- 20 files changed, 141 insertions(+), 98 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 22736cdf2b7..4994ce8eba1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,38 @@ +2009-04-18 Jan Hubicka + + * src/condition_variable.cc (condition_variable, + condition_variable_any constructors): Mark throw() + * src/hash.cc (operator() for long double, string, and wstring): Mark + throw (). + * src/strstream.cc (strstreambuf constructors, freeze, str, pcount, + _M_setup, rdbuf, str): Mark throw (). + * src/chrono.cc (new): Mark throw (). + * include/std/system_error (system_category, generic_category): Mark + throw () and const. + * include/std/chrono (now): Mark throw (). + * include/std/condition_variable (condition_variable, + ~condition_variable, condition_variable_any, + ~condition_variable_any): Mark throw (). + * include/std/mutex (mutex): Mark throw (). + * include/bits/stl_list.h (swap, transfer, reverse, hook, unhook): Mark + throw. + * include/bits/functional_hash.h (operator() on size_t): Mark pure and throw (). + * include/bits/locale_facets.tcc (__verify_grouping): Mark pure. + * include/bits/locale_classes.h (_S_initialize_once, + _S_clone_c_locale): Mark throw (). + (_S_get_c_name): Mark const and throw (). + (_M_id, _M_compare, _M_transform, _M_compare, _M_transform): Mark throw (). + * include/bits/locale_facets.h (__convert_to_v explicit instances): + Mark throw (). + (_M_convert_to_wmask, _M_initialize_ctype, _S_format_float): Mark throw (). + * include/bits/ios_base.h (_M_dispose_callbacks, _M_init, imbue, + ios_base): Mark throw () + * include/bits/locale_facets_nonio.h (_M_put): Mark throw. + * include/backward/strstream (strstreambuf constructors): Mark throw (). + (str, freeze, _M_setupf): Mark throw (). + (pcount): Mark pure and throw (). + (rdbuf): Mark const and throw (). + 2009-04-18 Paolo Carlini PR libstdc++/39802 diff --git a/libstdc++-v3/include/backward/strstream b/libstdc++-v3/include/backward/strstream index a643e8b8107..0ffbb81ea97 100644 --- a/libstdc++-v3/include/backward/strstream +++ b/libstdc++-v3/include/backward/strstream @@ -66,20 +66,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std) explicit strstreambuf(streamsize __initial_capacity = 0); strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*)); - strstreambuf(char* __get, streamsize __n, char* __put = 0); - strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0); - strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0); + strstreambuf(char* __get, streamsize __n, char* __put = 0) throw (); + strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0) throw (); + strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0) throw (); - strstreambuf(const char* __get, streamsize __n); - strstreambuf(const signed char* __get, streamsize __n); - strstreambuf(const unsigned char* __get, streamsize __n); + strstreambuf(const char* __get, streamsize __n) throw (); + strstreambuf(const signed char* __get, streamsize __n) throw (); + strstreambuf(const unsigned char* __get, streamsize __n) throw (); virtual ~strstreambuf(); public: - void freeze(bool = true); - char* str(); - int pcount() const; + void freeze(bool = true) throw (); + char* str() throw (); + _GLIBCXX_PURE int pcount() const throw (); protected: virtual int_type overflow(int_type __c = _Traits::eof()); @@ -103,7 +103,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void _M_free(char*); // Helper function used in constructors. - void _M_setup(char* __get, char* __put, streamsize __n); + void _M_setup(char* __get, char* __put, streamsize __n) throw (); private: // Data members. @@ -125,8 +125,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) istrstream(const char*, streamsize); virtual ~istrstream(); - strstreambuf* rdbuf() const; - char* str(); + _GLIBCXX_CONST strstreambuf* rdbuf() const throw (); + char* str() throw (); private: strstreambuf _M_buf; @@ -140,10 +140,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ostrstream(char*, int, ios_base::openmode = ios_base::out); virtual ~ostrstream(); - strstreambuf* rdbuf() const; - void freeze(bool = true); - char* str(); - int pcount() const; + _GLIBCXX_CONST strstreambuf* rdbuf() const throw (); + void freeze(bool = true) throw(); + char* str() throw (); + _GLIBCXX_PURE int pcount() const throw (); private: strstreambuf _M_buf; @@ -162,10 +162,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out); virtual ~strstream(); - strstreambuf* rdbuf() const; - void freeze(bool = true); - int pcount() const; - char* str(); + _GLIBCXX_CONST strstreambuf* rdbuf() const throw (); + void freeze(bool = true) throw (); + _GLIBCXX_PURE int pcount() const throw (); + char* str() throw (); private: strstreambuf _M_buf; diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 92f0ddd1901..62e64db9d47 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -326,4 +326,12 @@ _GLIBCXX_END_NAMESPACE # define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) #endif +#ifndef _GLIBCXX_NOTHROW +# ifdef __cplusplus +# define _GLIBCXX_NOTHROW throw() +# else +# define _GLIBCXX_NOTHROW __attribute__((nothrow)) +# endif +#endif + // End of prewritten config; the discovered settings follow. diff --git a/libstdc++-v3/include/bits/functional_hash.h b/libstdc++-v3/include/bits/functional_hash.h index 892fcfa6928..c21abfe08b2 100644 --- a/libstdc++-v3/include/bits/functional_hash.h +++ b/libstdc++-v3/include/bits/functional_hash.h @@ -60,8 +60,8 @@ namespace std struct error_code; template<> - size_t - hash::operator()(error_code) const; + _GLIBCXX_PURE size_t + hash::operator()(error_code) const throw (); } #endif // _FUNCTIONAL_HASH_H diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h index 8dde1003503..2badd4c4c1c 100644 --- a/libstdc++-v3/include/bits/ios_base.h +++ b/libstdc++-v3/include/bits/ios_base.h @@ -497,7 +497,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _M_call_callbacks(event __ev) throw(); void - _M_dispose_callbacks(void); + _M_dispose_callbacks(void) throw(); // 27.4.2.5 Members for iword/pword storage struct _Words @@ -526,7 +526,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale _M_ios_locale; void - _M_init(); + _M_init() throw (); public: @@ -685,7 +685,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * with imbue_event. */ locale - imbue(const locale& __loc); + imbue(const locale& __loc) throw (); /** * @brief Locale access @@ -782,7 +782,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) virtual ~ios_base(); protected: - ios_base(); + ios_base() throw (); // _GLIBCXX_RESOLVE_LIB_DEFECTS // 50. Copy constructor and assignment operator of ios_base diff --git a/libstdc++-v3/include/bits/locale_classes.h b/libstdc++-v3/include/bits/locale_classes.h index 4a646937cb9..1a7f2c20912 100644 --- a/libstdc++-v3/include/bits/locale_classes.h +++ b/libstdc++-v3/include/bits/locale_classes.h @@ -312,7 +312,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) _S_initialize(); static void - _S_initialize_once(); + _S_initialize_once() throw (); static category _S_normalize_category(category); @@ -376,7 +376,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __c_locale __old = 0); static __c_locale - _S_clone_c_locale(__c_locale& __cloc); + _S_clone_c_locale(__c_locale& __cloc) throw (); static void _S_destroy_c_locale(__c_locale& __cloc); @@ -386,8 +386,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) static __c_locale _S_get_c_locale(); - static const char* - _S_get_c_name(); + _GLIBCXX_CONST static const char* + _S_get_c_name() throw (); private: void @@ -457,7 +457,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) id() { } size_t - _M_id() const; + _M_id() const throw (); }; @@ -697,10 +697,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Used to abstract out _CharT bits in virtual member functions, below. int - _M_compare(const _CharT*, const _CharT*) const; + _M_compare(const _CharT*, const _CharT*) const throw (); size_t - _M_transform(_CharT*, const _CharT*, size_t) const; + _M_transform(_CharT*, const _CharT*, size_t) const throw (); protected: /// Destructor. @@ -759,20 +759,20 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Specializations. template<> int - collate::_M_compare(const char*, const char*) const; + collate::_M_compare(const char*, const char*) const throw (); template<> size_t - collate::_M_transform(char*, const char*, size_t) const; + collate::_M_transform(char*, const char*, size_t) const throw (); #ifdef _GLIBCXX_USE_WCHAR_T template<> int - collate::_M_compare(const wchar_t*, const wchar_t*) const; + collate::_M_compare(const wchar_t*, const wchar_t*) const throw (); template<> size_t - collate::_M_transform(wchar_t*, const wchar_t*, size_t) const; + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw (); #endif /// class collate_byname [22.2.4.2]. diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index c97e555a4a5..5dcf20576a0 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -119,13 +119,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Generic version does nothing. template int - collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () { return 0; } // Generic version does nothing. template size_t - collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () { return 0; } template diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index beed6f1c249..5dec0f49cbe 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -70,17 +70,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<> void __convert_to_v(const char*, float&, ios_base::iostate&, - const __c_locale&); + const __c_locale&) throw (); template<> void __convert_to_v(const char*, double&, ios_base::iostate&, - const __c_locale&); + const __c_locale&) throw (); template<> void __convert_to_v(const char*, long double&, ios_base::iostate&, - const __c_locale&); + const __c_locale&) throw (); // NB: __pad is a struct, rather than a function, so it can be // partially-specialized. @@ -1220,7 +1220,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) protected: __wmask_type - _M_convert_to_wmask(const mask __m) const; + _M_convert_to_wmask(const mask __m) const throw (); /// Destructor virtual @@ -1458,7 +1458,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // For use at construction time only. void - _M_initialize_ctype(); + _M_initialize_ctype() throw (); }; #endif //_GLIBCXX_USE_WCHAR_T @@ -1558,7 +1558,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // num_put // Construct and return valid scanf format for floating point types. static void - _S_format_float(const ios_base& __io, char* __fptr, char __mod); + _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw (); }; template diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index ba8f3988fd6..85b4ec646bb 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -118,9 +118,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // 1,222,444 == __grouping_tmp of "\1\3\3" // __grouping is parsed R to L // 1,222,444 == __grouping of "\3" == "\3\3\3" - bool + _GLIBCXX_PURE bool __verify_grouping(const char* __grouping, size_t __grouping_size, - const string& __grouping_tmp); + const string& __grouping_tmp) throw (); _GLIBCXX_BEGIN_LDBL_NAMESPACE diff --git a/libstdc++-v3/include/bits/locale_facets_nonio.h b/libstdc++-v3/include/bits/locale_facets_nonio.h index aba96d6c10f..e1518287a68 100644 --- a/libstdc++-v3/include/bits/locale_facets_nonio.h +++ b/libstdc++-v3/include/bits/locale_facets_nonio.h @@ -211,7 +211,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // value of strftime/wcsftime. void _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, - const tm* __tm) const; + const tm* __tm) const throw (); void _M_date_formats(const _CharT** __date) const @@ -325,7 +325,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<> void - __timepunct::_M_put(char*, size_t, const char*, const tm*) const; + __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); #ifdef _GLIBCXX_USE_WCHAR_T template<> @@ -335,7 +335,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) template<> void __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, - const tm*) const; + const tm*) const throw (); #endif _GLIBCXX_END_NAMESPACE @@ -844,8 +844,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // Construct and return valid pattern consisting of some combination of: // space none symbol sign value - static pattern - _S_construct_pattern(char __precedes, char __space, char __posn); + _GLIBCXX_CONST static pattern + _S_construct_pattern(char __precedes, char __space, char __posn) throw (); }; template diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 66a50b81e5d..bba1f53044e 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -74,20 +74,20 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) _List_node_base* _M_prev; static void - swap(_List_node_base& __x, _List_node_base& __y); + swap(_List_node_base& __x, _List_node_base& __y) throw (); void transfer(_List_node_base * const __first, - _List_node_base * const __last); + _List_node_base * const __last) throw (); void - reverse(); + reverse() throw (); void - hook(_List_node_base * const __position); + hook(_List_node_base * const __position) throw (); void - unhook(); + unhook() throw (); }; /// An actual node in the %list. diff --git a/libstdc++-v3/include/c_compatibility/stdatomic.h b/libstdc++-v3/include/c_compatibility/stdatomic.h index e06bf388ba9..634e916f4e8 100644 --- a/libstdc++-v3/include/c_compatibility/stdatomic.h +++ b/libstdc++-v3/include/c_compatibility/stdatomic.h @@ -121,21 +121,21 @@ _GLIBCXX_BEGIN_EXTERN_C // Accessor functions for base atomic_flag type. bool - atomic_flag_test_and_set_explicit(volatile __atomic_flag_base*, memory_order) throw (); + atomic_flag_test_and_set_explicit(volatile __atomic_flag_base*, memory_order) _GLIBCXX_NOTHROW; inline bool atomic_flag_test_and_set(volatile __atomic_flag_base* __a) { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } void - atomic_flag_clear_explicit(volatile __atomic_flag_base*, memory_order) throw (); + atomic_flag_clear_explicit(volatile __atomic_flag_base*, memory_order) _GLIBCXX_NOTHROW; inline void atomic_flag_clear(volatile __atomic_flag_base* __a) { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } void - __atomic_flag_wait_explicit(volatile __atomic_flag_base*, memory_order) throw (); + __atomic_flag_wait_explicit(volatile __atomic_flag_base*, memory_order) _GLIBCXX_NOTHROW; _GLIBCXX_CONST volatile __atomic_flag_base* __atomic_flag_for_address(const volatile void* __z) throw (); diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index aaa9646f2fc..d18f2777f51 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -614,7 +614,7 @@ namespace std static const bool is_monotonic = false; static time_point - now(); + now() throw (); // Map to C API static std::time_t diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index 64f2bb77118..f87eb1b8d1a 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -60,8 +60,8 @@ namespace std public: typedef __native_type* native_handle_type; - condition_variable(); - ~condition_variable(); + condition_variable() throw (); + ~condition_variable() throw (); condition_variable(const condition_variable&) = delete; condition_variable& operator=(const condition_variable&) = delete; @@ -168,8 +168,8 @@ namespace std public: typedef __native_type* native_handle_type; - condition_variable_any(); - ~condition_variable_any(); + condition_variable_any() throw (); + ~condition_variable_any() throw (); condition_variable_any(const condition_variable_any&) = delete; condition_variable_any& operator=(const condition_variable_any&) = delete; diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index eb71c764f6e..f26acc02f4f 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -395,7 +395,7 @@ namespace std { public: virtual const char* - what() const throw(); + _GLIBCXX_CONST what() const throw(); }; /// @brief Scoped lock idiom. diff --git a/libstdc++-v3/include/std/system_error b/libstdc++-v3/include/std/system_error index 3a6883ddc46..3d0cff21d69 100644 --- a/libstdc++-v3/include/std/system_error +++ b/libstdc++-v3/include/std/system_error @@ -105,8 +105,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) }; // DR 890. - const error_category& system_category(); - const error_category& generic_category(); + _GLIBCXX_CONST const error_category& system_category() throw (); + _GLIBCXX_CONST const error_category& generic_category() throw (); /// error_code // Implementation-specific error identification diff --git a/libstdc++-v3/src/chrono.cc b/libstdc++-v3/src/chrono.cc index f7640b09f44..422b97399ac 100644 --- a/libstdc++-v3/src/chrono.cc +++ b/libstdc++-v3/src/chrono.cc @@ -40,7 +40,7 @@ namespace std const bool system_clock::is_monotonic; system_clock::time_point - system_clock::now() + system_clock::now() throw () { #ifdef _GLIBCXX_USE_CLOCK_REALTIME timespec tp; diff --git a/libstdc++-v3/src/condition_variable.cc b/libstdc++-v3/src/condition_variable.cc index f7379cd9fef..4fb2f179dfd 100644 --- a/libstdc++-v3/src/condition_variable.cc +++ b/libstdc++-v3/src/condition_variable.cc @@ -28,7 +28,7 @@ namespace std { - condition_variable::condition_variable() + condition_variable::condition_variable() throw () { #ifdef __GTHREAD_COND_INIT __native_type __tmp = __GTHREAD_COND_INIT; @@ -41,7 +41,7 @@ namespace std #endif } - condition_variable::~condition_variable() + condition_variable::~condition_variable() throw () { // XXX no thread blocked /* int __e = */ __gthread_cond_destroy(&_M_cond); @@ -79,7 +79,7 @@ namespace std __throw_system_error(__e); } - condition_variable_any::condition_variable_any() + condition_variable_any::condition_variable_any() throw () { #ifdef __GTHREAD_COND_INIT __native_type __tmp = __GTHREAD_COND_INIT; @@ -92,7 +92,7 @@ namespace std #endif } - condition_variable_any::~condition_variable_any() + condition_variable_any::~condition_variable_any() throw () { __gthread_cond_destroy(&_M_cond); } diff --git a/libstdc++-v3/src/hash.cc b/libstdc++-v3/src/hash.cc index 96931bc0f2c..790cfee3e22 100644 --- a/libstdc++-v3/src/hash.cc +++ b/libstdc++-v3/src/hash.cc @@ -44,7 +44,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 // 10 bytes -> 12 bytes) and resort to frexp. template<> size_t - hash::operator()(long double __val) const + hash::operator()(long double __val) const throw () { size_t __result = 0; @@ -72,18 +72,18 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 #ifndef _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL template<> size_t - hash::operator()(string __s) const + hash::operator()(string __s) const throw () { return _Fnv_hash<>::hash(__s.data(), __s.length()); } template<> size_t - hash::operator()(const string& __s) const + hash::operator()(const string& __s) const throw () { return _Fnv_hash<>::hash(__s.data(), __s.length()); } #ifdef _GLIBCXX_USE_WCHAR_T template<> size_t - hash::operator()(wstring __s) const + hash::operator()(wstring __s) const throw () { const char* __p = reinterpret_cast(__s.data()); return _Fnv_hash<>::hash(__p, __s.length() * sizeof(wchar_t)); @@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 template<> size_t - hash::operator()(const wstring& __s) const + hash::operator()(const wstring& __s) const throw () { const char* __p = reinterpret_cast(__s.data()); return _Fnv_hash<>::hash(__p, __s.length() * sizeof(wchar_t)); diff --git a/libstdc++-v3/src/strstream.cc b/libstdc++-v3/src/strstream.cc index 5ec70fcb798..fbc5f518297 100644 --- a/libstdc++-v3/src/strstream.cc +++ b/libstdc++-v3/src/strstream.cc @@ -78,33 +78,33 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } } - strstreambuf::strstreambuf(char* get, streamsize n, char* put) + strstreambuf::strstreambuf(char* get, streamsize n, char* put) throw () : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(false) { _M_setup(get, put, n); } - strstreambuf::strstreambuf(signed char* get, streamsize n, signed char* put) + strstreambuf::strstreambuf(signed char* get, streamsize n, signed char* put) throw () : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(false) { _M_setup(reinterpret_cast(get), reinterpret_cast(put), n); } strstreambuf::strstreambuf(unsigned char* get, streamsize n, - unsigned char* put) + unsigned char* put) throw () : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(false) { _M_setup(reinterpret_cast(get), reinterpret_cast(put), n); } - strstreambuf::strstreambuf(const char* get, streamsize n) + strstreambuf::strstreambuf(const char* get, streamsize n) throw () : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(true) { _M_setup(const_cast(get), 0, n); } - strstreambuf::strstreambuf(const signed char* get, streamsize n) + strstreambuf::strstreambuf(const signed char* get, streamsize n) throw () : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(true) { _M_setup(reinterpret_cast(const_cast(get)), 0, n); } - strstreambuf::strstreambuf(const unsigned char* get, streamsize n) + strstreambuf::strstreambuf(const unsigned char* get, streamsize n) throw () : _Base(), _M_alloc_fun(0), _M_free_fun(0), _M_dynamic(false), _M_frozen(false), _M_constant(true) { _M_setup(reinterpret_cast(const_cast(get)), 0, n); } @@ -116,21 +116,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } void - strstreambuf::freeze(bool frozenflag) + strstreambuf::freeze(bool frozenflag) throw () { if (_M_dynamic) _M_frozen = frozenflag; } char* - strstreambuf::str() + strstreambuf::str() throw () { freeze(true); return eback(); } int - strstreambuf::pcount() const + strstreambuf::pcount() const throw () { return pptr() ? pptr() - pbase() : 0; } strstreambuf::int_type @@ -315,7 +315,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) } void - strstreambuf::_M_setup(char* get, char* put, streamsize n) + strstreambuf::_M_setup(char* get, char* put, streamsize n) throw () { if (get) { @@ -350,11 +350,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) istrstream::~istrstream() { } strstreambuf* - istrstream::rdbuf() const + istrstream::rdbuf() const throw () { return const_cast(&_M_buf); } char* - istrstream::str() + istrstream::str() throw () { return _M_buf.str(); } ostrstream::ostrstream() @@ -369,19 +369,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ostrstream::~ostrstream() {} strstreambuf* - ostrstream::rdbuf() const + ostrstream::rdbuf() const throw () { return const_cast(&_M_buf); } void - ostrstream::freeze(bool freezeflag) + ostrstream::freeze(bool freezeflag) throw () { _M_buf.freeze(freezeflag); } char* - ostrstream::str() + ostrstream::str() throw () { return _M_buf.str(); } int - ostrstream::pcount() const + ostrstream::pcount() const throw () { return _M_buf.pcount(); } strstream::strstream() @@ -396,19 +396,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstream::~strstream() { } strstreambuf* - strstream::rdbuf() const + strstream::rdbuf() const throw () { return const_cast(&_M_buf); } void - strstream::freeze(bool freezeflag) + strstream::freeze(bool freezeflag) throw () { _M_buf.freeze(freezeflag); } int - strstream::pcount() const + strstream::pcount() const throw () { return _M_buf.pcount(); } char* - strstream::str() + strstream::str() throw () { return _M_buf.str(); } _GLIBCXX_END_NAMESPACE