[v3] Minor <atomic> tweaks
Paolo Carlini
paolo.carlini@oracle.com
Fri Oct 24 12:50:00 GMT 2014
Hi,
tested x86_64-linux.
Thanks,
Paolo.
///////////////////////
-------------- next part --------------
2014-10-24 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/atomic_base.h: Avoid including <stdbool.h>.
* include/std/atomic: When __cplusplus < 201103L skip the rest of
the header.
* testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc: Adjust.
-------------- next part --------------
Index: include/bits/atomic_base.h
===================================================================
--- include/bits/atomic_base.h (revision 216624)
+++ include/bits/atomic_base.h (working copy)
@@ -33,7 +33,6 @@
#pragma GCC system_header
#include <bits/c++config.h>
-#include <stdbool.h>
#include <stdint.h>
#include <bits/atomic_lockfree_defines.h>
Index: include/std/atomic
===================================================================
--- include/std/atomic (revision 216624)
+++ include/std/atomic (working copy)
@@ -36,7 +36,7 @@
#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
-#endif
+#else
#include <bits/atomic_base.h>
@@ -1129,4 +1129,6 @@
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif
+#endif // C++11
+
+#endif // _GLIBCXX_ATOMIC
Index: testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc
===================================================================
--- testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc (revision 216624)
+++ testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc (working copy)
@@ -18,7 +18,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-#include <atomic> // { dg-excess-errors "In file included from" }
+#include <atomic>
// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
More information about the Libstdc++
mailing list