aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/backward/strstream40
-rw-r--r--libstdc++-v3/include/bits/c++config20
-rw-r--r--libstdc++-v3/include/bits/forward_list.h12
-rw-r--r--libstdc++-v3/include/bits/functional_hash.h4
-rw-r--r--libstdc++-v3/include/bits/ios_base.h8
-rw-r--r--libstdc++-v3/include/bits/locale_classes.h22
-rw-r--r--libstdc++-v3/include/bits/locale_classes.tcc4
-rw-r--r--libstdc++-v3/include/bits/locale_facets.h12
-rw-r--r--libstdc++-v3/include/bits/locale_facets.tcc13
-rw-r--r--libstdc++-v3/include/bits/locale_facets_nonio.h10
-rw-r--r--libstdc++-v3/include/bits/stl_list.h10
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h24
-rw-r--r--libstdc++-v3/include/c_compatibility/stdatomic.h10
-rw-r--r--libstdc++-v3/include/debug/formatter.h9
-rw-r--r--libstdc++-v3/include/debug/safe_base.h12
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h8
-rw-r--r--libstdc++-v3/include/ext/pool_allocator.h6
-rw-r--r--libstdc++-v3/include/std/chrono2
-rw-r--r--libstdc++-v3/include/std/condition_variable8
-rw-r--r--libstdc++-v3/include/std/mutex2
-rw-r--r--libstdc++-v3/include/std/system_error4
21 files changed, 131 insertions, 109 deletions
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 dfbe48c8f1f..d5babc31959 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -314,4 +314,24 @@ _GLIBCXX_END_NAMESPACE
#undef min
#undef max
+#ifndef _GLIBCXX_PURE
+# define _GLIBCXX_PURE __attribute__ ((__pure__))
+#endif
+
+#ifndef _GLIBCXX_CONST
+# define _GLIBCXX_CONST __attribute__ ((__const__))
+#endif
+
+#ifndef _GLIBCXX_NORETURN
+# 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/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index d6f42bdf722..d49eb4a0678 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This is just a linked list with a data value in each node.
* There is a sorting utility method.
*/
- template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ template<typename _Tp, typename _Alloc>
struct _Fwd_list_node : public _Fwd_list_node_base<_Alloc>
{
typedef typename _Alloc::template rebind<_Fwd_list_node<_Tp, _Alloc> >
@@ -104,7 +104,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* All the functions are op overloads.
*/
- template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ template<typename _Tp, typename _Alloc>
struct _Fwd_list_iterator
{
typedef _Fwd_list_iterator<_Tp, _Alloc> _Self;
@@ -171,7 +171,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*
* All the functions are op overloads.
*/
- template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ template<typename _Tp, typename _Alloc>
struct _Fwd_list_const_iterator
{
typedef _Fwd_list_const_iterator<_Tp, _Alloc> _Self;
@@ -240,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Forward list iterator equality comparison.
*/
- template<typename _Tp,class _Alloc>
+ template<typename _Tp, typename _Alloc>
inline bool
operator==(const _Fwd_list_iterator<_Tp, _Alloc>& __x,
const _Fwd_list_const_iterator<_Tp, _Alloc>& __y)
@@ -249,7 +249,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Forward list iterator inequality comparison.
*/
- template<typename _Tp,class _Alloc>
+ template<typename _Tp, typename _Alloc>
inline bool
operator!=(const _Fwd_list_iterator<_Tp, _Alloc>& __x,
const _Fwd_list_const_iterator<_Tp, _Alloc>& __y)
@@ -258,7 +258,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @brief Base class for %forward_list.
*/
- template<typename _Tp, typename _Alloc = allocator<_Tp> >
+ template<typename _Tp, typename _Alloc>
struct _Fwd_list_base
{
protected:
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<error_code>::operator()(error_code) const;
+ _GLIBCXX_PURE size_t
+ hash<error_code>::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<char>::_M_compare(const char*, const char*) const;
+ collate<char>::_M_compare(const char*, const char*) const throw ();
template<>
size_t
- collate<char>::_M_transform(char*, const char*, size_t) const;
+ collate<char>::_M_transform(char*, const char*, size_t) const throw ();
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
int
- collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const;
+ collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw ();
template<>
size_t
- collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const;
+ collate<wchar_t>::_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<typename _CharT>
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<typename _CharT>
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<typename _CharT>
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<typename _CharT>
diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc
index 47eac6a44c7..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
@@ -379,8 +379,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
if (!__testeof)
{
__c = *__beg;
- if (__gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
- __negative = __c == __lit[__num_base::_S_iminus];
+ __negative = __c == __lit[__num_base::_S_iminus];
if ((__negative || __c == __lit[__num_base::_S_iplus])
&& !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
&& !(__c == __lc->_M_decimal_point))
@@ -449,7 +448,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
__found_grouping.reserve(32);
bool __testfail = false;
bool __testoverflow = false;
- const __unsigned_type __max = __negative
+ const __unsigned_type __max =
+ (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
? -__gnu_cxx::__numeric_traits<_ValueT>::__min
: __gnu_cxx::__numeric_traits<_ValueT>::__max;
const __unsigned_type __smax = __max / __base;
@@ -552,7 +552,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
}
else if (__testoverflow)
{
- if (__negative)
+ if (__negative
+ && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
__v = __gnu_cxx::__numeric_traits<_ValueT>::__min;
else
__v = __gnu_cxx::__numeric_traits<_ValueT>::__max;
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<char>::_M_put(char*, size_t, const char*, const tm*) const;
+ __timepunct<char>::_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<wchar_t>::_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<typename _CharT, bool _Intl>
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/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index 2e567360039..ecf3b5c3fe4 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -137,17 +137,17 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#endif
};
- _Rb_tree_node_base*
- _Rb_tree_increment(_Rb_tree_node_base* __x);
+ _GLIBCXX_PURE _Rb_tree_node_base*
+ _Rb_tree_increment(_Rb_tree_node_base* __x) throw ();
- const _Rb_tree_node_base*
- _Rb_tree_increment(const _Rb_tree_node_base* __x);
+ _GLIBCXX_PURE const _Rb_tree_node_base*
+ _Rb_tree_increment(const _Rb_tree_node_base* __x) throw ();
- _Rb_tree_node_base*
- _Rb_tree_decrement(_Rb_tree_node_base* __x);
+ _GLIBCXX_PURE _Rb_tree_node_base*
+ _Rb_tree_decrement(_Rb_tree_node_base* __x) throw ();
- const _Rb_tree_node_base*
- _Rb_tree_decrement(const _Rb_tree_node_base* __x);
+ _GLIBCXX_PURE const _Rb_tree_node_base*
+ _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw ();
template<typename _Tp>
struct _Rb_tree_iterator
@@ -310,11 +310,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_Rb_tree_insert_and_rebalance(const bool __insert_left,
_Rb_tree_node_base* __x,
_Rb_tree_node_base* __p,
- _Rb_tree_node_base& __header);
+ _Rb_tree_node_base& __header) throw ();
_Rb_tree_node_base*
_Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
- _Rb_tree_node_base& __header);
+ _Rb_tree_node_base& __header) throw ();
template<typename _Key, typename _Val, typename _KeyOfValue,
@@ -1448,9 +1448,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __n;
}
- unsigned int
+ _GLIBCXX_PURE unsigned int
_Rb_tree_black_count(const _Rb_tree_node_base* __node,
- const _Rb_tree_node_base* __root);
+ const _Rb_tree_node_base* __root) throw ();
template<typename _Key, typename _Val, typename _KeyOfValue,
typename _Compare, typename _Alloc>
diff --git a/libstdc++-v3/include/c_compatibility/stdatomic.h b/libstdc++-v3/include/c_compatibility/stdatomic.h
index 71ddb8507a4..f4771166d2b 100644
--- a/libstdc++-v3/include/c_compatibility/stdatomic.h
+++ b/libstdc++-v3/include/c_compatibility/stdatomic.h
@@ -121,24 +121,24 @@ _GLIBCXX_BEGIN_EXTERN_C
// Accessor functions for base atomic_flag type.
bool
- atomic_flag_test_and_set_explicit(volatile __atomic_flag_base*, memory_order);
+ 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);
+ 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);
+ __atomic_flag_wait_explicit(volatile __atomic_flag_base*, memory_order) _GLIBCXX_NOTHROW;
- volatile __atomic_flag_base*
- __atomic_flag_for_address(const volatile void* __z) __attribute__((const));
+ _GLIBCXX_CONST volatile __atomic_flag_base*
+ __atomic_flag_for_address(const volatile void* __z) _GLIBCXX_NOTHROW;
// Implementation specific defines.
#define _ATOMIC_LOAD_(__a, __x) \
diff --git a/libstdc++-v3/include/debug/formatter.h b/libstdc++-v3/include/debug/formatter.h
index 0538edb1544..6dffc6b786d 100644
--- a/libstdc++-v3/include/debug/formatter.h
+++ b/libstdc++-v3/include/debug/formatter.h
@@ -29,6 +29,7 @@
#ifndef _GLIBCXX_DEBUG_FORMATTER_H
#define _GLIBCXX_DEBUG_FORMATTER_H 1
+#include <bits/c++config.h>
#include <typeinfo>
#include <debug/debug.h>
@@ -345,9 +346,9 @@ namespace __gnu_debug
{ _M_text = __text; return *this; }
const _Error_formatter&
- _M_message(_Debug_msg_id __id) const;
+ _M_message(_Debug_msg_id __id) const throw ();
- void
+ _GLIBCXX_NORETURN void
_M_error() const;
private:
@@ -358,7 +359,7 @@ namespace __gnu_debug
template<typename _Tp>
void
- _M_format_word(char*, int, const char*, _Tp) const;
+ _M_format_word(char*, int, const char*, _Tp) const throw ();
void
_M_print_word(const char* __word) const;
@@ -367,7 +368,7 @@ namespace __gnu_debug
_M_print_string(const char* __string) const;
void
- _M_get_max_length() const;
+ _M_get_max_length() const throw ();
enum { __max_parameters = 9 };
diff --git a/libstdc++-v3/include/debug/safe_base.h b/libstdc++-v3/include/debug/safe_base.h
index 1bef5e7ef15..9d44539b732 100644
--- a/libstdc++-v3/include/debug/safe_base.h
+++ b/libstdc++-v3/include/debug/safe_base.h
@@ -105,7 +105,7 @@ namespace __gnu_debug
~_Safe_iterator_base() { this->_M_detach(); }
/** For use in _Safe_iterator. */
- __gnu_cxx::__mutex& _M_get_mutex();
+ __gnu_cxx::__mutex& _M_get_mutex() throw ();
public:
/** Attaches this iterator to the given sequence, detaching it
@@ -116,7 +116,7 @@ namespace __gnu_debug
void _M_attach(_Safe_sequence_base* __seq, bool __constant);
/** Likewise, but not thread-safe. */
- void _M_attach_single(_Safe_sequence_base* __seq, bool __constant);
+ void _M_attach_single(_Safe_sequence_base* __seq, bool __constant) throw ();
/** Detach the iterator for whatever sequence it is attached to,
* if any.
@@ -124,19 +124,19 @@ namespace __gnu_debug
void _M_detach();
/** Likewise, but not thread-safe. */
- void _M_detach_single();
+ void _M_detach_single() throw ();
/** Determines if we are attached to the given sequence. */
bool _M_attached_to(const _Safe_sequence_base* __seq) const
{ return _M_sequence == __seq; }
/** Is this iterator singular? */
- bool _M_singular() const;
+ _GLIBCXX_PURE bool _M_singular() const throw ();
/** Can we compare this iterator to the given iterator @p __x?
Returns true if both iterators are nonsingular and reference
the same sequence. */
- bool _M_can_compare(const _Safe_iterator_base& __x) const;
+ _GLIBCXX_PURE bool _M_can_compare(const _Safe_iterator_base& __x) const throw ();
};
/**
@@ -207,7 +207,7 @@ namespace __gnu_debug
_M_swap(_Safe_sequence_base& __x);
/** For use in _Safe_sequence. */
- __gnu_cxx::__mutex& _M_get_mutex();
+ __gnu_cxx::__mutex& _M_get_mutex() throw ();
public:
/** Invalidates all iterators. */
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index f03f3a61030..fc31fe8a737 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -221,7 +221,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_reserve_block(size_t __bytes, const size_t __thread_id);
void
- _M_reclaim_block(char* __p, size_t __bytes);
+ _M_reclaim_block(char* __p, size_t __bytes) throw ();
size_t
_M_get_thread_id() { return 0; }
@@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_reserve_block(size_t __bytes, const size_t __thread_id);
void
- _M_reclaim_block(char* __p, size_t __bytes);
+ _M_reclaim_block(char* __p, size_t __bytes) throw ();
const _Bin_record&
_M_get_bin(size_t __which)
@@ -351,8 +351,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
}
// XXX GLIBCXX_ABI Deprecated
- void
- _M_destroy_thread_key(void*);
+ _GLIBCXX_CONST void
+ _M_destroy_thread_key(void*) throw ();
size_t
_M_get_thread_id();
diff --git a/libstdc++-v3/include/ext/pool_allocator.h b/libstdc++-v3/include/ext/pool_allocator.h
index 87d145d71ef..d7077b1986b 100644
--- a/libstdc++-v3/include/ext/pool_allocator.h
+++ b/libstdc++-v3/include/ext/pool_allocator.h
@@ -96,11 +96,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_M_round_up(size_t __bytes)
{ return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); }
- _Obj* volatile*
- _M_get_free_list(size_t __bytes);
+ _GLIBCXX_CONST _Obj* volatile*
+ _M_get_free_list(size_t __bytes) throw ();
__mutex&
- _M_get_mutex();
+ _M_get_mutex() throw ();
// Returns an object of size __n, and optionally adds to size __n
// free list.
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