summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-18 15:48:16 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-18 15:48:16 +0000
commit52fbe752dd27208474b081ef4a45365de858edaa (patch)
tree74629d2486edc497cc2f32e7b666fd1f23f63e71 /libstdc++-v3
parent6cda323a81120ae087e2a7cb23dc9d0a09b68fde (diff)
downloadgcc-52fbe752dd27208474b081ef4a45365de858edaa.tar.gz
* include/debug/formater.h: Include bits/c++config.h.
(_M_error): Mark noreturn. * include/bits/c++config (_GLIBCXX_PURE, _GLIBCXX_CONST, _GLIBCXX_NORETURN): New. * include/bits/stl_tree.h (_Rb_tree_increment, _Rb_tree_increment, _Rb_tree_decrement, _Rb_tree_decrement, _Rb_tree_black_count): Mark pure. * include/c_compatibility/stdatomic.h (atomic_flag_test_and_set_explicit, atomic_flag_clear_explicit, __atomic_flag_wait_explicit, __atomic_flag_for_address): Mark by throw (). * src/atomic.cc (atomic_flag_test_and_set_explicit, atomic_flag_clear_explicit, __atomic_flag_wait_explicit, __atomic_flag_for_address): Mark by throw (). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146317 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog15
-rw-r--r--libstdc++-v3/include/bits/c++config12
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h10
-rw-r--r--libstdc++-v3/include/c_compatibility/stdatomic.h10
-rw-r--r--libstdc++-v3/include/debug/formatter.h3
-rw-r--r--libstdc++-v3/src/atomic.cc8
6 files changed, 43 insertions, 15 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 208e56ce3e8..7c434cf1d8a 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,18 @@
+2009-04-18 Jan Hubicka <jh@suse.cz>
+
+ * include/debug/formater.h: Include bits/c++config.h.
+ (_M_error): Mark noreturn.
+ * include/bits/c++config (_GLIBCXX_PURE, _GLIBCXX_CONST,
+ _GLIBCXX_NORETURN): New.
+ * include/bits/stl_tree.h (_Rb_tree_increment, _Rb_tree_increment,
+ _Rb_tree_decrement, _Rb_tree_decrement, _Rb_tree_black_count): Mark pure.
+ * include/c_compatibility/stdatomic.h (atomic_flag_test_and_set_explicit,
+ atomic_flag_clear_explicit, __atomic_flag_wait_explicit,
+ __atomic_flag_for_address): Mark by throw ().
+ * src/atomic.cc (atomic_flag_test_and_set_explicit,
+ atomic_flag_clear_explicit, __atomic_flag_wait_explicit,
+ __atomic_flag_for_address): Mark by throw ().
+
2009-04-17 Uros Bizjak <ubizjak@gmail.com>
* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Regenerated.
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index dfbe48c8f1f..92f0ddd1901 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -314,4 +314,16 @@ _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
+
// End of prewritten config; the discovered settings follow.
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index a1274e7a11e..ecf3b5c3fe4 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -137,16 +137,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#endif
};
- _Rb_tree_node_base*
+ _GLIBCXX_PURE _Rb_tree_node_base*
_Rb_tree_increment(_Rb_tree_node_base* __x) throw ();
- const _Rb_tree_node_base*
+ _GLIBCXX_PURE const _Rb_tree_node_base*
_Rb_tree_increment(const _Rb_tree_node_base* __x) throw ();
- _Rb_tree_node_base*
+ _GLIBCXX_PURE _Rb_tree_node_base*
_Rb_tree_decrement(_Rb_tree_node_base* __x) throw ();
- const _Rb_tree_node_base*
+ _GLIBCXX_PURE const _Rb_tree_node_base*
_Rb_tree_decrement(const _Rb_tree_node_base* __x) throw ();
template<typename _Tp>
@@ -1448,7 +1448,7 @@ _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) throw ();
diff --git a/libstdc++-v3/include/c_compatibility/stdatomic.h b/libstdc++-v3/include/c_compatibility/stdatomic.h
index 71ddb8507a4..e06bf388ba9 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) throw ();
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) throw ();
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) throw ();
- 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) throw ();
// 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..6f4f8edc9d1 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>
@@ -347,7 +348,7 @@ namespace __gnu_debug
const _Error_formatter&
_M_message(_Debug_msg_id __id) const;
- void
+ _GLIBCXX_NORETURN void
_M_error() const;
private:
diff --git a/libstdc++-v3/src/atomic.cc b/libstdc++-v3/src/atomic.cc
index e3e668b4cb5..3a2ff3d52e9 100644
--- a/libstdc++-v3/src/atomic.cc
+++ b/libstdc++-v3/src/atomic.cc
@@ -78,7 +78,7 @@ namespace std
{
bool
atomic_flag_test_and_set_explicit(volatile __atomic_flag_base* __a,
- memory_order __m)
+ memory_order __m) throw ()
{
volatile atomic_flag d(__a->_M_i);
return d.test_and_set(__m);
@@ -86,7 +86,7 @@ namespace std
void
atomic_flag_clear_explicit(volatile __atomic_flag_base* __a,
- memory_order __m)
+ memory_order __m) throw ()
{
volatile atomic_flag d(__a->_M_i);
return d.clear(__m);
@@ -94,14 +94,14 @@ namespace std
void
__atomic_flag_wait_explicit(volatile __atomic_flag_base* __a,
- memory_order __x)
+ memory_order __x) throw ()
{
while (atomic_flag_test_and_set_explicit(__a, __x))
{ };
}
volatile __atomic_flag_base*
- __atomic_flag_for_address(const volatile void* __z)
+ __atomic_flag_for_address(const volatile void* __z) throw ()
{
uintptr_t __u = reinterpret_cast<uintptr_t>(__z);
__u += (__u >> 2) + (__u << 4);