OSDN Git Service

2009-12-20 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Dec 2009 19:00:34 +0000 (19:00 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Dec 2009 19:00:34 +0000 (19:00 +0000)
* include/std/atomic: Update to N3000.
* include/bits/atomic_0.h: Same.
* include/bits/atomic_2.h: Same.
* include/c_global/cstdatomic: Move...
* include/bits/atomic_base.h: ...here.
* include/c_compatibility/stdatomic.h: Just include atomic_base.h.
* include/precompiled/stdc++.h: Adjust includes.
* include/Makefile.am: Adjust files.
* include/Makefile.in: Regenerate.
* include/std/future: Adjust.
* src/atomic.cc: Adjust, adjust exports for compatibility.
* src/compatibility.cc: Move C++0x stuff...
* src/compatibility-c++0x.cc: ...here.

* doc/xml/manual/using.xml: Update.
* doc/xml/manual/status_cxx200x.xml: Update.
* doc/doxygen/user.cfg.in: Update.

* testsuite/29_atomics/atomic_address/cons/assign_neg.cc: Same.
* testsuite/29_atomics/atomic_address/cons/single_value.cc: Same.
* testsuite/29_atomics/atomic_address/cons/copy_neg.cc: Same.
* testsuite/29_atomics/atomic_address/cons/default.cc: Same.
* testsuite/29_atomics/atomic_address/cons/aggregate.cc: Same.
* testsuite/29_atomics/atomic_address/requirements/
standard_layout.cc: Same.
* testsuite/29_atomics/atomic_address/requirements/trivial.cc: Same.
* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
* testsuite/29_atomics/atomic_integral/cons/single_value.cc: Same.
* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
* testsuite/29_atomics/atomic_integral/cons/default.cc: Same.
* testsuite/29_atomics/atomic_integral/cons/copy_list.cc: Same.
* testsuite/29_atomics/atomic_integral/cons/direct_list.cc: Same.
* testsuite/29_atomics/atomic_integral/requirements/
standard_layout.cc: Same.
* testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/
integral_assignment.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/increment.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/bitwise.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/decrement.cc: Same.
* testsuite/29_atomics/atomic_integral/operators/
integral_conversion.cc: Same.
* testsuite/29_atomics/atomic_flag/cons/assign_neg.cc: Same.
* testsuite/29_atomics/atomic_flag/cons/copy_neg.cc: Same.
* testsuite/29_atomics/atomic_flag/cons/default.cc: Same.
* testsuite/29_atomics/atomic_flag/cons/aggregate.cc: Same.
* testsuite/29_atomics/atomic_flag/requirements/
standard_layout.cc: Same.
* testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Same.
* testsuite/29_atomics/atomic_flag/clear/1.cc: Same.
* testsuite/29_atomics/atomic_flag/test_and_set/explicit.c
* testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc: Same.
* testsuite/29_atomics/atomic_flag/test_and_set/implicit.c
* testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc: Same.
* testsuite/29_atomics/headers/stdatomic.h/functions.c
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
* testsuite/29_atomics/atomic/cons/single_value.cc: Same.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
* testsuite/29_atomics/atomic/cons/default.cc: Same.
* testsuite/29_atomics/atomic/cons/copy_list.cc: Same.
* testsuite/29_atomics/atomic/cons/direct_list.cc: Same.
* testsuite/29_atomics/atomic/requirements/explicit_instantiation/
1.cc: Same.
* testsuite/29_atomics/atomic/requirements/base_classes.cc: Same.
* testsuite/29_atomics/atomic/operators/integral_assignment.cc: Same.
* testsuite/29_atomics/atomic/operators/integral_conversion.cc: Same.
* testsuite/util/testsuite_common_types.h: Adjust.

* testsuite/29_atomics/headers/cstdatomic: Move and adjust...
* testsuite/29_atomics/headers/atomic: ...here.
* testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Same.
* testsuite/29_atomics/headers/atomic/functions_std_c++0x.cc: Same.
* testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc: Same.
* testsuite/29_atomics/headers/atomic/macros.cc: Same.

* testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc: Add.
* testsuite/29_atomics/atomic/cons/user_pod.cc: Add.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155377 138bc75d-0d04-0410-961f-82ee72b054a4

68 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/doc/doxygen/user.cfg.in
libstdc++-v3/doc/xml/manual/status_cxx200x.xml
libstdc++-v3/doc/xml/manual/using.xml
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/atomic_0.h
libstdc++-v3/include/bits/atomic_2.h
libstdc++-v3/include/bits/atomic_base.h [new file with mode: 0644]
libstdc++-v3/include/c_compatibility/stdatomic.h
libstdc++-v3/include/precompiled/stdc++.h
libstdc++-v3/include/std/atomic [moved from libstdc++-v3/include/c_global/cstdatomic with 63% similarity]
libstdc++-v3/include/std/future
libstdc++-v3/src/atomic.cc
libstdc++-v3/src/compatibility-c++0x.cc
libstdc++-v3/src/compatibility.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_list.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/default.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/direct_list.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/single_value.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/user_pod.cc [new file with mode: 0644]
libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_assignment.cc
libstdc++-v3/testsuite/29_atomics/atomic/operators/integral_conversion.cc
libstdc++-v3/testsuite/29_atomics/atomic/requirements/base_classes.cc
libstdc++-v3/testsuite/29_atomics/atomic/requirements/explicit_instantiation/1.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/cons/aggregate.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/cons/default.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/cons/single_value.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/standard_layout.cc
libstdc++-v3/testsuite/29_atomics/atomic_address/requirements/trivial.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/aggregate.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/cons/default.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/standard_layout.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/requirements/trivial.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.c
libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc
libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.c
libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_list.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/default.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/direct_list.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/single_value.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_assignment.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/integral_conversion.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/standard_layout.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/requirements/trivial.cc
libstdc++-v3/testsuite/29_atomics/headers/atomic/functions_std_c++0x.cc [moved from libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/functions_std_c++0x.cc with 98% similarity]
libstdc++-v3/testsuite/29_atomics/headers/atomic/macros.cc [moved from libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/macros.cc with 98% similarity]
libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc [moved from libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/std_c++0x_neg.cc with 92% similarity]
libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x.cc [moved from libstdc++-v3/testsuite/29_atomics/headers/cstdatomic/types_std_c++0x.cc with 99% similarity]
libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/functions.c
libstdc++-v3/testsuite/util/testsuite_common_types.h

index 2077dc1..50840c7 100644 (file)
@@ -1,3 +1,86 @@
+2009-12-20  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * include/std/atomic: Update to N3000.
+       * include/bits/atomic_0.h: Same.
+       * include/bits/atomic_2.h: Same.
+       * include/c_global/cstdatomic: Move...
+       * include/bits/atomic_base.h: ...here.
+       * include/c_compatibility/stdatomic.h: Just include atomic_base.h.
+       * include/precompiled/stdc++.h: Adjust includes.
+       * include/Makefile.am: Adjust files.
+       * include/Makefile.in: Regenerate.
+       * include/std/future: Adjust.
+       * src/atomic.cc: Adjust, adjust exports for compatibility.
+       * src/compatibility.cc: Move C++0x stuff...
+       * src/compatibility-c++0x.cc: ...here.
+
+       * doc/xml/manual/using.xml: Update.
+       * doc/xml/manual/status_cxx200x.xml: Update.
+       * doc/doxygen/user.cfg.in: Update.
+
+       * testsuite/29_atomics/atomic_address/cons/assign_neg.cc: Same.
+       * testsuite/29_atomics/atomic_address/cons/single_value.cc: Same.
+       * testsuite/29_atomics/atomic_address/cons/copy_neg.cc: Same.
+       * testsuite/29_atomics/atomic_address/cons/default.cc: Same.
+       * testsuite/29_atomics/atomic_address/cons/aggregate.cc: Same.
+       * testsuite/29_atomics/atomic_address/requirements/
+       standard_layout.cc: Same.
+       * testsuite/29_atomics/atomic_address/requirements/trivial.cc: Same.
+       * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Same.
+       * testsuite/29_atomics/atomic_integral/cons/single_value.cc: Same.
+       * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
+       * testsuite/29_atomics/atomic_integral/cons/default.cc: Same.
+       * testsuite/29_atomics/atomic_integral/cons/copy_list.cc: Same.
+       * testsuite/29_atomics/atomic_integral/cons/direct_list.cc: Same.
+       * testsuite/29_atomics/atomic_integral/requirements/
+       standard_layout.cc: Same.
+       * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/
+       integral_assignment.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/increment.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/bitwise.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/decrement.cc: Same.
+       * testsuite/29_atomics/atomic_integral/operators/
+       integral_conversion.cc: Same.
+       * testsuite/29_atomics/atomic_flag/cons/assign_neg.cc: Same.
+       * testsuite/29_atomics/atomic_flag/cons/copy_neg.cc: Same.
+       * testsuite/29_atomics/atomic_flag/cons/default.cc: Same.
+       * testsuite/29_atomics/atomic_flag/cons/aggregate.cc: Same.
+       * testsuite/29_atomics/atomic_flag/requirements/
+       standard_layout.cc: Same.
+       * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Same.
+       * testsuite/29_atomics/atomic_flag/clear/1.cc: Same.
+       * testsuite/29_atomics/atomic_flag/test_and_set/explicit.c
+       * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc: Same.
+       * testsuite/29_atomics/atomic_flag/test_and_set/implicit.c
+       * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc: Same.
+       * testsuite/29_atomics/headers/stdatomic.h/functions.c
+       * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
+       * testsuite/29_atomics/atomic/cons/single_value.cc: Same.
+       * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
+       * testsuite/29_atomics/atomic/cons/default.cc: Same.
+       * testsuite/29_atomics/atomic/cons/copy_list.cc: Same.
+       * testsuite/29_atomics/atomic/cons/direct_list.cc: Same.
+       * testsuite/29_atomics/atomic/requirements/explicit_instantiation/
+       1.cc: Same.
+       * testsuite/29_atomics/atomic/requirements/base_classes.cc: Same.
+       * testsuite/29_atomics/atomic/operators/integral_assignment.cc: Same.
+       * testsuite/29_atomics/atomic/operators/integral_conversion.cc: Same.
+       * testsuite/util/testsuite_common_types.h: Adjust.
+
+       * testsuite/29_atomics/headers/cstdatomic: Move and adjust...
+       * testsuite/29_atomics/headers/atomic: ...here.
+       * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Same.
+       * testsuite/29_atomics/headers/atomic/functions_std_c++0x.cc: Same.
+       * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc: Same.
+       * testsuite/29_atomics/headers/atomic/macros.cc: Same.
+
+       * testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc: Add.
+       * testsuite/29_atomics/atomic/cons/user_pod.cc: Add.
+
 2009-12-18  Jimmy Guo  <jguo@yahoo-inc.com>
 
        PR libstdc++/40088
 2009-12-18  Jimmy Guo  <jguo@yahoo-inc.com>
 
        PR libstdc++/40088
index 649b84d..34795fa 100644 (file)
@@ -580,6 +580,7 @@ INPUT                  = @srcdir@/doc/doxygen/doxygroups.cc \
                          @srcdir@/libsupc++/typeinfo \
                          include/algorithm \
                          include/array \
                          @srcdir@/libsupc++/typeinfo \
                          include/algorithm \
                          include/array \
+                         include/atomic \
                          include/bitset \
                          include/chrono \
                          include/complex \
                          include/bitset \
                          include/chrono \
                          include/complex \
@@ -635,7 +636,6 @@ INPUT                  = @srcdir@/doc/doxygen/doxygroups.cc \
                          include/csetjmp \
                          include/csignal \
                          include/cstdarg \
                          include/csetjmp \
                          include/csignal \
                          include/cstdarg \
-                         include/cstdatomic \
                          include/cstdbool \
                          include/cstddef \
                          include/cstdint \
                          include/cstdbool \
                          include/cstddef \
                          include/cstdint \
index 61b2ec2..b7c0fac 100644 (file)
@@ -2200,7 +2200,7 @@ particular release.
     </row>
     <row>
       <entry>29.2</entry>
     </row>
     <row>
       <entry>29.2</entry>
-      <entry>Header <code>&lt;cstdatomic&gt;</code> synopsis</entry>
+      <entry>Header <code>&lt;atomic&gt;</code> synopsis</entry>
       <entry>Y</entry>
       <entry></entry>
     </row>
       <entry>Y</entry>
       <entry></entry>
     </row>
index d9ff8ca..cab3d0b 100644 (file)
@@ -329,24 +329,23 @@ mode, i.e. <literal>-std=c++0x</literal> or <literal>-std=gnu++0x</literal>.
 <entry><filename class="headerfile">csetjmp</filename></entry>
 <entry><filename class="headerfile">csignal</filename></entry>
 <entry><filename class="headerfile">cstdarg</filename></entry>
 <entry><filename class="headerfile">csetjmp</filename></entry>
 <entry><filename class="headerfile">csignal</filename></entry>
 <entry><filename class="headerfile">cstdarg</filename></entry>
-<entry><filename class="headerfile">cstdatomic</filename></entry>
+<entry><filename class="headerfile">cstdbool</filename></entry>
 </row>
 <row>
 </row>
 <row>
-<entry><filename class="headerfile">cstdbool</filename></entry>
 <entry><filename class="headerfile">cstddef</filename></entry>
 <entry><filename class="headerfile">cstdint</filename></entry>
 <entry><filename class="headerfile">cstdlib</filename></entry>
 <entry><filename class="headerfile">cstdio</filename></entry>
 <entry><filename class="headerfile">cstddef</filename></entry>
 <entry><filename class="headerfile">cstdint</filename></entry>
 <entry><filename class="headerfile">cstdlib</filename></entry>
 <entry><filename class="headerfile">cstdio</filename></entry>
+<entry><filename class="headerfile">cstring</filename></entry>
 </row>
 <row>
 </row>
 <row>
-<entry><filename class="headerfile">cstring</filename></entry>
 <entry><filename class="headerfile">ctgmath</filename></entry>
 <entry><filename class="headerfile">ctime</filename></entry>
 <entry><filename class="headerfile">cuchar</filename></entry>
 <entry><filename class="headerfile">cwchar</filename></entry>
 <entry><filename class="headerfile">ctgmath</filename></entry>
 <entry><filename class="headerfile">ctime</filename></entry>
 <entry><filename class="headerfile">cuchar</filename></entry>
 <entry><filename class="headerfile">cwchar</filename></entry>
+<entry><filename class="headerfile">cwctype</filename></entry>
 </row>
 <row>
 </row>
 <row>
-<entry><filename class="headerfile">cwctype</filename></entry>
 <entry><filename class="headerfile">stdatomic.h</filename></entry>
 </row>
 
 <entry><filename class="headerfile">stdatomic.h</filename></entry>
 </row>
 
index 8d4ece7..69f90a4 100644 (file)
@@ -29,6 +29,7 @@ std_builddir = .
 std_headers = \
        ${std_srcdir}/algorithm \
        ${std_srcdir}/array \
 std_headers = \
        ${std_srcdir}/algorithm \
        ${std_srcdir}/array \
+       ${std_srcdir}/atomic \
        ${std_srcdir}/bitset \
        ${std_srcdir}/c++0x_warning.h \
        ${std_srcdir}/chrono \
        ${std_srcdir}/bitset \
        ${std_srcdir}/c++0x_warning.h \
        ${std_srcdir}/chrono \
@@ -78,6 +79,7 @@ bits_builddir = ./bits
 bits_headers = \
         ${bits_srcdir}/algorithmfwd.h \
        ${bits_srcdir}/allocator.h \
 bits_headers = \
         ${bits_srcdir}/algorithmfwd.h \
        ${bits_srcdir}/allocator.h \
+       ${bits_srcdir}/atomic_base.h \
        ${bits_srcdir}/atomicfwd_c.h \
        ${bits_srcdir}/atomicfwd_cxx.h \
        ${bits_srcdir}/atomic_0.h \
        ${bits_srcdir}/atomicfwd_c.h \
        ${bits_srcdir}/atomicfwd_cxx.h \
        ${bits_srcdir}/atomic_0.h \
@@ -641,7 +643,6 @@ c_base_headers = \
        ${c_base_srcdir}/csetjmp \
        ${c_base_srcdir}/csignal \
        ${c_base_srcdir}/cstdarg \
        ${c_base_srcdir}/csetjmp \
        ${c_base_srcdir}/csignal \
        ${c_base_srcdir}/cstdarg \
-       ${c_base_srcdir}/cstdatomic \
        ${c_base_srcdir}/cstdbool \
        ${c_base_srcdir}/cstddef \
        ${c_base_srcdir}/cstdint \
        ${c_base_srcdir}/cstdbool \
        ${c_base_srcdir}/cstddef \
        ${c_base_srcdir}/cstdint \
index 892fb3b..1a25e1e 100644 (file)
@@ -271,6 +271,7 @@ std_builddir = .
 std_headers = \
        ${std_srcdir}/algorithm \
        ${std_srcdir}/array \
 std_headers = \
        ${std_srcdir}/algorithm \
        ${std_srcdir}/array \
+       ${std_srcdir}/atomic \
        ${std_srcdir}/bitset \
        ${std_srcdir}/c++0x_warning.h \
        ${std_srcdir}/chrono \
        ${std_srcdir}/bitset \
        ${std_srcdir}/c++0x_warning.h \
        ${std_srcdir}/chrono \
@@ -320,6 +321,7 @@ bits_builddir = ./bits
 bits_headers = \
         ${bits_srcdir}/algorithmfwd.h \
        ${bits_srcdir}/allocator.h \
 bits_headers = \
         ${bits_srcdir}/algorithmfwd.h \
        ${bits_srcdir}/allocator.h \
+       ${bits_srcdir}/atomic_base.h \
        ${bits_srcdir}/atomicfwd_c.h \
        ${bits_srcdir}/atomicfwd_cxx.h \
        ${bits_srcdir}/atomic_0.h \
        ${bits_srcdir}/atomicfwd_c.h \
        ${bits_srcdir}/atomicfwd_cxx.h \
        ${bits_srcdir}/atomic_0.h \
@@ -881,7 +883,6 @@ c_base_headers = \
        ${c_base_srcdir}/csetjmp \
        ${c_base_srcdir}/csignal \
        ${c_base_srcdir}/cstdarg \
        ${c_base_srcdir}/csetjmp \
        ${c_base_srcdir}/csignal \
        ${c_base_srcdir}/cstdarg \
-       ${c_base_srcdir}/cstdatomic \
        ${c_base_srcdir}/cstdbool \
        ${c_base_srcdir}/cstddef \
        ${c_base_srcdir}/cstdint \
        ${c_base_srcdir}/cstdbool \
        ${c_base_srcdir}/cstddef \
        ${c_base_srcdir}/cstdint \
index 0caffaf..a39de4a 100644 (file)
@@ -42,26 +42,26 @@ namespace __atomic0
 
   // Implementation specific defines.
 #define _ATOMIC_LOAD_(__a, __x)                                                   \
 
   // Implementation specific defines.
 #define _ATOMIC_LOAD_(__a, __x)                                                   \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;         \
-    volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);     \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                           \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);             \
     __atomic_flag_wait_explicit(__g, __x);                                \
     __typeof__ _ATOMIC_MEMBER_ __r = *__p;                                \
     atomic_flag_clear_explicit(__g, __x);                                 \
     __r; })
 
 #define _ATOMIC_STORE_(__a, __m, __x)                                     \
     __atomic_flag_wait_explicit(__g, __x);                                \
     __typeof__ _ATOMIC_MEMBER_ __r = *__p;                                \
     atomic_flag_clear_explicit(__g, __x);                                 \
     __r; })
 
 #define _ATOMIC_STORE_(__a, __m, __x)                                     \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;         \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                           \
     __typeof__(__m) __v = (__m);                                          \
     __typeof__(__m) __v = (__m);                                          \
-    volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);     \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);             \
     __atomic_flag_wait_explicit(__g, __x);                                \
     *__p = __v;                                                                   \
     atomic_flag_clear_explicit(__g, __x);                                 \
     __v; })
 
 #define _ATOMIC_MODIFY_(__a, __o, __m, __x)                               \
     __atomic_flag_wait_explicit(__g, __x);                                \
     *__p = __v;                                                                   \
     atomic_flag_clear_explicit(__g, __x);                                 \
     __v; })
 
 #define _ATOMIC_MODIFY_(__a, __o, __m, __x)                               \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;         \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                           \
     __typeof__(__m) __v = (__m);                                          \
     __typeof__(__m) __v = (__m);                                          \
-    volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);     \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);             \
     __atomic_flag_wait_explicit(__g, __x);                                \
     __typeof__ _ATOMIC_MEMBER_ __r = *__p;                                \
     *__p __o __v;                                                         \
     __atomic_flag_wait_explicit(__g, __x);                                \
     __typeof__ _ATOMIC_MEMBER_ __r = *__p;                                \
     *__p __o __v;                                                         \
@@ -69,11 +69,11 @@ namespace __atomic0
     __r; })
 
 #define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)                            \
     __r; })
 
 #define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)                            \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;         \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                           \
     __typeof__(__e) __q = (__e);                                          \
     __typeof__(__m) __v = (__m);                                          \
     bool __r;                                                             \
     __typeof__(__e) __q = (__e);                                          \
     __typeof__(__m) __v = (__m);                                          \
     bool __r;                                                             \
-    volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);     \
+    __atomic_flag_base* __g = __atomic_flag_for_address(__p);             \
     __atomic_flag_wait_explicit(__g, __x);                                \
     __typeof__ _ATOMIC_MEMBER_ __t__ = *__p;                              \
     if (__t__ == *__q) { *__p = __v; __r = true; }                        \
     __atomic_flag_wait_explicit(__g, __x);                                \
     __typeof__ _ATOMIC_MEMBER_ __t__ = *__p;                              \
     if (__t__ == *__q) { *__p = __v; __r = true; }                        \
@@ -87,16 +87,16 @@ namespace __atomic0
     atomic_flag() = default;
     ~atomic_flag() = default;
     atomic_flag(const atomic_flag&) = delete;
     atomic_flag() = default;
     ~atomic_flag() = default;
     atomic_flag(const atomic_flag&) = delete;
-    atomic_flag& operator=(const atomic_flag&) = delete;
+    atomic_flag& operator=(const atomic_flag&) volatile = delete;
 
     // Conversion to ATOMIC_FLAG_INIT.
     atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
 
     bool
 
     // Conversion to ATOMIC_FLAG_INIT.
     atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
 
     bool
-    test_and_set(memory_order __m = memory_order_seq_cst) volatile;
+    test_and_set(memory_order __m = memory_order_seq_cst);
 
     void
 
     void
-    clear(memory_order __m = memory_order_seq_cst) volatile;
+    clear(memory_order __m = memory_order_seq_cst);
   };
 
   /// 29.4.2, address types
   };
 
   /// 29.4.2, address types
@@ -109,16 +109,16 @@ namespace __atomic0
     atomic_address() = default;
     ~atomic_address() = default;
     atomic_address(const atomic_address&) = delete;
     atomic_address() = default;
     ~atomic_address() = default;
     atomic_address(const atomic_address&) = delete;
-    atomic_address& operator=(const atomic_address&) = delete;
+    atomic_address& operator=(const atomic_address&) volatile = delete;
 
     atomic_address(void* __v) { _M_i = __v; }
 
     bool
 
     atomic_address(void* __v) { _M_i = __v; }
 
     bool
-    is_lock_free() const volatile
+    is_lock_free() const
     { return false; }
 
     void
     { return false; }
 
     void
-    store(void* __v, memory_order __m = memory_order_seq_cst) volatile
+    store(void* __v, memory_order __m = memory_order_seq_cst)
     {
       __glibcxx_assert(__m != memory_order_acquire);
       __glibcxx_assert(__m != memory_order_acq_rel);
     {
       __glibcxx_assert(__m != memory_order_acquire);
       __glibcxx_assert(__m != memory_order_acq_rel);
@@ -127,7 +127,7 @@ namespace __atomic0
     }
 
     void*
     }
 
     void*
-    load(memory_order __m = memory_order_seq_cst) const volatile
+    load(memory_order __m = memory_order_seq_cst) const
     {
       __glibcxx_assert(__m != memory_order_release);
       __glibcxx_assert(__m != memory_order_acq_rel);
     {
       __glibcxx_assert(__m != memory_order_release);
       __glibcxx_assert(__m != memory_order_acq_rel);
@@ -135,12 +135,12 @@ namespace __atomic0
     }
 
     void*
     }
 
     void*
-    exchange(void* __v, memory_order __m = memory_order_seq_cst) volatile
+    exchange(void* __v, memory_order __m = memory_order_seq_cst)
     { return _ATOMIC_MODIFY_(this, =, __v, __m); }
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
     { return _ATOMIC_MODIFY_(this, =, __v, __m); }
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
-                         memory_order __m2) volatile
+                         memory_order __m2)
     {
       __glibcxx_assert(__m2 != memory_order_release);
       __glibcxx_assert(__m2 != memory_order_acq_rel);
     {
       __glibcxx_assert(__m2 != memory_order_release);
       __glibcxx_assert(__m2 != memory_order_acq_rel);
@@ -150,7 +150,7 @@ namespace __atomic0
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2,
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2,
-                         memory_order __m = memory_order_seq_cst) volatile
+                         memory_order __m = memory_order_seq_cst)
     {
       return compare_exchange_weak(__v1, __v2, __m,
                                   __calculate_memory_order(__m));
     {
       return compare_exchange_weak(__v1, __v2, __m,
                                   __calculate_memory_order(__m));
@@ -158,7 +158,7 @@ namespace __atomic0
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
-                           memory_order __m2) volatile
+                           memory_order __m2)
     {
       __glibcxx_assert(__m2 != memory_order_release);
       __glibcxx_assert(__m2 != memory_order_acq_rel);
     {
       __glibcxx_assert(__m2 != memory_order_release);
       __glibcxx_assert(__m2 != memory_order_acq_rel);
@@ -168,17 +168,17 @@ namespace __atomic0
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2,
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2,
-                         memory_order __m = memory_order_seq_cst) volatile
+                         memory_order __m = memory_order_seq_cst)
     {
       return compare_exchange_strong(__v1, __v2, __m,
                                     __calculate_memory_order(__m));
     }
 
     void*
     {
       return compare_exchange_strong(__v1, __v2, __m,
                                     __calculate_memory_order(__m));
     }
 
     void*
-    fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+    fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
     {
     {
-      void* volatile* __p = &(_M_i);
-      volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);
+      void** __p = &(_M_i);
+      __atomic_flag_base* __g = __atomic_flag_for_address(__p);
       __atomic_flag_wait_explicit(__g, __m);
       void* __r = *__p;
       *__p = (void*)((char*)(*__p) + __d);
       __atomic_flag_wait_explicit(__g, __m);
       void* __r = *__p;
       *__p = (void*)((char*)(*__p) + __d);
@@ -187,10 +187,10 @@ namespace __atomic0
     }
 
     void*
     }
 
     void*
-    fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+    fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
     {
     {
-      void* volatile* __p = &(_M_i);
-      volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);
+      void** __p = &(_M_i);
+      __atomic_flag_base* __g = __atomic_flag_for_address(__p);
       __atomic_flag_wait_explicit(__g, __m);
       void* __r = *__p;
       *__p = (void*)((char*)(*__p) - __d);
       __atomic_flag_wait_explicit(__g, __m);
       void* __r = *__p;
       *__p = (void*)((char*)(*__p) - __d);
@@ -198,22 +198,22 @@ namespace __atomic0
       return __r;
     }
 
       return __r;
     }
 
-    operator void*() const volatile
+    operator void*() const
     { return load(); }
 
     void*
     { return load(); }
 
     void*
-    operator=(void* __v) // XXX volatile
+    operator=(void* __v)
     {
       store(__v);
       return __v;
     }
 
     void*
     {
       store(__v);
       return __v;
     }
 
     void*
-    operator+=(ptrdiff_t __d) volatile
+    operator+=(ptrdiff_t __d)
     { return fetch_add(__d) + __d; }
 
     void*
     { return fetch_add(__d) + __d; }
 
     void*
-    operator-=(ptrdiff_t __d) volatile
+    operator-=(ptrdiff_t __d)
     { return fetch_sub(__d) - __d; }
   };
 
     { return fetch_sub(__d) - __d; }
   };
 
@@ -252,64 +252,63 @@ namespace __atomic0
       __atomic_base() = default;
       ~__atomic_base() = default;
       __atomic_base(const __atomic_base&) = delete;
       __atomic_base() = default;
       ~__atomic_base() = default;
       __atomic_base(const __atomic_base&) = delete;
-      __atomic_base& operator=(const __atomic_base&) = delete;
+      __atomic_base& operator=(const __atomic_base&) volatile = delete;
 
       // Requires __integral_type convertible to _M_base._M_i.
       __atomic_base(__integral_type __i) { _M_i = __i; }
 
 
       // Requires __integral_type convertible to _M_base._M_i.
       __atomic_base(__integral_type __i) { _M_i = __i; }
 
-      operator __integral_type() const volatile
+      operator __integral_type() const
       { return load(); }
 
       __integral_type
       { return load(); }
 
       __integral_type
-      operator=(__integral_type __i) // XXX volatile
+      operator=(__integral_type __i)
       {
        store(__i);
        return __i;
       }
 
       __integral_type
       {
        store(__i);
        return __i;
       }
 
       __integral_type
-      operator++(int) volatile
+      operator++(int)
       { return fetch_add(1); }
 
       __integral_type
       { return fetch_add(1); }
 
       __integral_type
-      operator--(int) volatile
+      operator--(int)
       { return fetch_sub(1); }
 
       __integral_type
       { return fetch_sub(1); }
 
       __integral_type
-      operator++() volatile
+      operator++()
       { return fetch_add(1) + 1; }
 
       __integral_type
       { return fetch_add(1) + 1; }
 
       __integral_type
-      operator--() volatile
+      operator--()
       { return fetch_sub(1) - 1; }
 
       __integral_type
       { return fetch_sub(1) - 1; }
 
       __integral_type
-      operator+=(__integral_type __i) volatile
+      operator+=(__integral_type __i)
       { return fetch_add(__i) + __i; }
 
       __integral_type
       { return fetch_add(__i) + __i; }
 
       __integral_type
-      operator-=(__integral_type __i) volatile
+      operator-=(__integral_type __i)
       { return fetch_sub(__i) - __i; }
 
       __integral_type
       { return fetch_sub(__i) - __i; }
 
       __integral_type
-      operator&=(__integral_type __i) volatile
+      operator&=(__integral_type __i)
       { return fetch_and(__i) & __i; }
 
       __integral_type
       { return fetch_and(__i) & __i; }
 
       __integral_type
-      operator|=(__integral_type __i) volatile
+      operator|=(__integral_type __i)
       { return fetch_or(__i) | __i; }
 
       __integral_type
       { return fetch_or(__i) | __i; }
 
       __integral_type
-      operator^=(__integral_type __i) volatile
+      operator^=(__integral_type __i)
       { return fetch_xor(__i) ^ __i; }
 
       bool
       { return fetch_xor(__i) ^ __i; }
 
       bool
-      is_lock_free() const volatile
+      is_lock_free() const
       { return false; }
 
       void
       { return false; }
 
       void
-      store(__integral_type __i,
-           memory_order __m = memory_order_seq_cst) volatile
+      store(__integral_type __i, memory_order __m = memory_order_seq_cst)
       {
        __glibcxx_assert(__m != memory_order_acquire);
        __glibcxx_assert(__m != memory_order_acq_rel);
       {
        __glibcxx_assert(__m != memory_order_acquire);
        __glibcxx_assert(__m != memory_order_acq_rel);
@@ -318,7 +317,7 @@ namespace __atomic0
       }
 
       __integral_type
       }
 
       __integral_type
-      load(memory_order __m = memory_order_seq_cst) const volatile
+      load(memory_order __m = memory_order_seq_cst) const
       {
        __glibcxx_assert(__m != memory_order_release);
        __glibcxx_assert(__m != memory_order_acq_rel);
       {
        __glibcxx_assert(__m != memory_order_release);
        __glibcxx_assert(__m != memory_order_acq_rel);
@@ -326,13 +325,12 @@ namespace __atomic0
       }
 
       __integral_type
       }
 
       __integral_type
-      exchange(__integral_type __i,
-              memory_order __m = memory_order_seq_cst) volatile
+      exchange(__integral_type __i, memory_order __m = memory_order_seq_cst)
       { return _ATOMIC_MODIFY_(this, =, __i, __m); }
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
       { return _ATOMIC_MODIFY_(this, =, __i, __m); }
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
-                           memory_order __m1, memory_order __m2) volatile
+                           memory_order __m1, memory_order __m2)
       {
        __glibcxx_assert(__m2 != memory_order_release);
        __glibcxx_assert(__m2 != memory_order_acq_rel);
       {
        __glibcxx_assert(__m2 != memory_order_release);
        __glibcxx_assert(__m2 != memory_order_acq_rel);
@@ -342,7 +340,7 @@ namespace __atomic0
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
-                           memory_order __m = memory_order_seq_cst) volatile
+                           memory_order __m = memory_order_seq_cst)
       {
        return compare_exchange_weak(__i1, __i2, __m,
                                     __calculate_memory_order(__m));
       {
        return compare_exchange_weak(__i1, __i2, __m,
                                     __calculate_memory_order(__m));
@@ -350,7 +348,7 @@ namespace __atomic0
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
-                             memory_order __m1, memory_order __m2) volatile
+                             memory_order __m1, memory_order __m2)
       {
        __glibcxx_assert(__m2 != memory_order_release);
        __glibcxx_assert(__m2 != memory_order_acq_rel);
       {
        __glibcxx_assert(__m2 != memory_order_release);
        __glibcxx_assert(__m2 != memory_order_acq_rel);
@@ -360,35 +358,30 @@ namespace __atomic0
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
-                             memory_order __m = memory_order_seq_cst) volatile
+                             memory_order __m = memory_order_seq_cst)
       {
        return compare_exchange_strong(__i1, __i2, __m,
                                       __calculate_memory_order(__m));
       }
 
       __integral_type
       {
        return compare_exchange_strong(__i1, __i2, __m,
                                       __calculate_memory_order(__m));
       }
 
       __integral_type
-      fetch_add(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+      fetch_add(__integral_type __i, memory_order __m = memory_order_seq_cst)
       { return _ATOMIC_MODIFY_(this, +=, __i, __m); }
 
       __integral_type
       { return _ATOMIC_MODIFY_(this, +=, __i, __m); }
 
       __integral_type
-      fetch_sub(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+      fetch_sub(__integral_type __i, memory_order __m = memory_order_seq_cst)
       { return _ATOMIC_MODIFY_(this, -=, __i, __m); }
 
       __integral_type
       { return _ATOMIC_MODIFY_(this, -=, __i, __m); }
 
       __integral_type
-      fetch_and(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+      fetch_and(__integral_type __i, memory_order __m = memory_order_seq_cst)
       { return _ATOMIC_MODIFY_(this, &=, __i, __m); }
 
       __integral_type
       { return _ATOMIC_MODIFY_(this, &=, __i, __m); }
 
       __integral_type
-      fetch_or(__integral_type __i,
-              memory_order __m = memory_order_seq_cst) volatile
+      fetch_or(__integral_type __i, memory_order __m = memory_order_seq_cst)
       { return _ATOMIC_MODIFY_(this, |=, __i, __m); }
 
       __integral_type
       { return _ATOMIC_MODIFY_(this, |=, __i, __m); }
 
       __integral_type
-      fetch_xor(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+      fetch_xor(__integral_type __i, memory_order __m = memory_order_seq_cst)
       { return _ATOMIC_MODIFY_(this, ^=, __i, __m); }
     };
 
       { return _ATOMIC_MODIFY_(this, ^=, __i, __m); }
     };
 
@@ -404,52 +397,52 @@ namespace __atomic0
     atomic_bool() = default;
     ~atomic_bool() = default;
     atomic_bool(const atomic_bool&) = delete;
     atomic_bool() = default;
     ~atomic_bool() = default;
     atomic_bool(const atomic_bool&) = delete;
-    atomic_bool& operator=(const atomic_bool&) = delete;
+    atomic_bool& operator=(const atomic_bool&) volatile = delete;
 
     atomic_bool(bool __i) : _M_base(__i) { }
 
     bool
 
     atomic_bool(bool __i) : _M_base(__i) { }
 
     bool
-    operator=(bool __i) // XXX volatile
+    operator=(bool __i)
     { return _M_base.operator=(__i); }
 
     { return _M_base.operator=(__i); }
 
-    operator bool() const volatile
+    operator bool() const
     { return _M_base.load(); }
 
     bool
     { return _M_base.load(); }
 
     bool
-    is_lock_free() const volatile
+    is_lock_free() const
     { return _M_base.is_lock_free(); }
 
     void
     { return _M_base.is_lock_free(); }
 
     void
-    store(bool __i, memory_order __m = memory_order_seq_cst) volatile
+    store(bool __i, memory_order __m = memory_order_seq_cst)
     { _M_base.store(__i, __m); }
 
     bool
     { _M_base.store(__i, __m); }
 
     bool
-    load(memory_order __m = memory_order_seq_cst) const volatile
+    load(memory_order __m = memory_order_seq_cst) const
     { return _M_base.load(__m); }
 
     bool
     { return _M_base.load(__m); }
 
     bool
-    exchange(bool __i, memory_order __m = memory_order_seq_cst) volatile
+    exchange(bool __i, memory_order __m = memory_order_seq_cst)
     { return _M_base.exchange(__i, __m); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
     { return _M_base.exchange(__i, __m); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
-                         memory_order __m2) volatile
+                         memory_order __m2)
     { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2,
     { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2,
-                         memory_order __m = memory_order_seq_cst) volatile
+                         memory_order __m = memory_order_seq_cst)
     { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
     { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
-                           memory_order __m2) volatile
+                           memory_order __m2)
     { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
 
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2,
     { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
 
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2,
-                           memory_order __m = memory_order_seq_cst) volatile
+                           memory_order __m = memory_order_seq_cst)
     { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
   };
 
     { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
   };
 
index 2815d59..fa6c0d5 100644 (file)
@@ -49,13 +49,13 @@ namespace __atomic2
     atomic_flag() = default;
     ~atomic_flag() = default;
     atomic_flag(const atomic_flag&) = delete;
     atomic_flag() = default;
     ~atomic_flag() = default;
     atomic_flag(const atomic_flag&) = delete;
-    atomic_flag& operator=(const atomic_flag&) = delete;
+    atomic_flag& operator=(const atomic_flag&) volatile = delete;
 
     // Conversion to ATOMIC_FLAG_INIT.
     atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
 
     bool
 
     // Conversion to ATOMIC_FLAG_INIT.
     atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
 
     bool
-    test_and_set(memory_order __m = memory_order_seq_cst) volatile
+    test_and_set(memory_order __m = memory_order_seq_cst)
     {
       // Redundant synchronize if built-in for lock is a full barrier.
       if (__m != memory_order_acquire && __m != memory_order_acq_rel)
     {
       // Redundant synchronize if built-in for lock is a full barrier.
       if (__m != memory_order_acquire && __m != memory_order_acq_rel)
@@ -64,7 +64,7 @@ namespace __atomic2
     }
 
     void
     }
 
     void
-    clear(memory_order __m = memory_order_seq_cst) volatile
+    clear(memory_order __m = memory_order_seq_cst)
     {
       __glibcxx_assert(__m != memory_order_consume);
       __glibcxx_assert(__m != memory_order_acquire);
     {
       __glibcxx_assert(__m != memory_order_consume);
       __glibcxx_assert(__m != memory_order_acquire);
@@ -87,16 +87,16 @@ namespace __atomic2
     atomic_address() = default;
     ~atomic_address() = default;
     atomic_address(const atomic_address&) = delete;
     atomic_address() = default;
     ~atomic_address() = default;
     atomic_address(const atomic_address&) = delete;
-    atomic_address& operator=(const atomic_address&) = delete;
+    atomic_address& operator=(const atomic_address&) volatile = delete;
 
     atomic_address(void* __v) { _M_i = __v; }
 
     bool
 
     atomic_address(void* __v) { _M_i = __v; }
 
     bool
-    is_lock_free() const volatile
+    is_lock_free() const
     { return true; }
 
     void
     { return true; }
 
     void
-    store(void* __v, memory_order __m = memory_order_seq_cst) volatile
+    store(void* __v, memory_order __m = memory_order_seq_cst)
     {
       __glibcxx_assert(__m != memory_order_acquire);
       __glibcxx_assert(__m != memory_order_acq_rel);
     {
       __glibcxx_assert(__m != memory_order_acquire);
       __glibcxx_assert(__m != memory_order_acq_rel);
@@ -114,7 +114,7 @@ namespace __atomic2
     }
 
     void*
     }
 
     void*
-    load(memory_order __m = memory_order_seq_cst) const volatile
+    load(memory_order __m = memory_order_seq_cst) const
     {
       __glibcxx_assert(__m != memory_order_release);
       __glibcxx_assert(__m != memory_order_acq_rel);
     {
       __glibcxx_assert(__m != memory_order_release);
       __glibcxx_assert(__m != memory_order_acq_rel);
@@ -126,7 +126,7 @@ namespace __atomic2
     }
 
     void*
     }
 
     void*
-    exchange(void* __v, memory_order __m = memory_order_seq_cst) volatile
+    exchange(void* __v, memory_order __m = memory_order_seq_cst)
     {
       // XXX built-in assumes memory_order_acquire.
       return __sync_lock_test_and_set(&_M_i, __v);
     {
       // XXX built-in assumes memory_order_acquire.
       return __sync_lock_test_and_set(&_M_i, __v);
@@ -134,12 +134,12 @@ namespace __atomic2
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
-                         memory_order __m2) volatile
+                         memory_order __m2)
     { return compare_exchange_strong(__v1, __v2, __m1, __m2); }
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2,
     { return compare_exchange_strong(__v1, __v2, __m1, __m2); }
 
     bool
     compare_exchange_weak(void*& __v1, void* __v2,
-                         memory_order __m = memory_order_seq_cst) volatile
+                         memory_order __m = memory_order_seq_cst)
     {
       return compare_exchange_weak(__v1, __v2, __m,
                                   __calculate_memory_order(__m));
     {
       return compare_exchange_weak(__v1, __v2, __m,
                                   __calculate_memory_order(__m));
@@ -147,7 +147,7 @@ namespace __atomic2
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
-                           memory_order __m2) volatile
+                           memory_order __m2)
     {
       __glibcxx_assert(__m2 != memory_order_release);
       __glibcxx_assert(__m2 != memory_order_acq_rel);
     {
       __glibcxx_assert(__m2 != memory_order_release);
       __glibcxx_assert(__m2 != memory_order_acq_rel);
@@ -163,36 +163,36 @@ namespace __atomic2
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2,
 
     bool
     compare_exchange_strong(void*& __v1, void* __v2,
-                         memory_order __m = memory_order_seq_cst) volatile
+                         memory_order __m = memory_order_seq_cst)
     {
       return compare_exchange_strong(__v1, __v2, __m,
                                     __calculate_memory_order(__m));
     }
 
     void*
     {
       return compare_exchange_strong(__v1, __v2, __m,
                                     __calculate_memory_order(__m));
     }
 
     void*
-    fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+    fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
     { return __sync_fetch_and_add(&_M_i, __d); }
 
     void*
     { return __sync_fetch_and_add(&_M_i, __d); }
 
     void*
-    fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+    fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst)
     { return __sync_fetch_and_sub(&_M_i, __d); }
 
     { return __sync_fetch_and_sub(&_M_i, __d); }
 
-    operator void*() const volatile
+    operator void*() const
     { return load(); }
 
     void*
     { return load(); }
 
     void*
-    operator=(void* __v) // XXX volatile
+    operator=(void* __v)
     {
       store(__v);
       return __v;
     }
 
     void*
     {
       store(__v);
       return __v;
     }
 
     void*
-    operator+=(ptrdiff_t __d) volatile
+    operator+=(ptrdiff_t __d)
     { return __sync_add_and_fetch(&_M_i, __d); }
 
     void*
     { return __sync_add_and_fetch(&_M_i, __d); }
 
     void*
-    operator-=(ptrdiff_t __d) volatile
+    operator-=(ptrdiff_t __d)
     { return __sync_sub_and_fetch(&_M_i, __d); }
   };
 
     { return __sync_sub_and_fetch(&_M_i, __d); }
   };
 
@@ -230,64 +230,63 @@ namespace __atomic2
       __atomic_base() = default;
       ~__atomic_base() = default;
       __atomic_base(const __atomic_base&) = delete;
       __atomic_base() = default;
       ~__atomic_base() = default;
       __atomic_base(const __atomic_base&) = delete;
-      __atomic_base& operator=(const __atomic_base&) = delete;
+      __atomic_base& operator=(const __atomic_base&) volatile = delete;
 
       // Requires __integral_type convertible to _M_base._M_i.
       __atomic_base(__integral_type __i) { _M_i = __i; }
 
 
       // Requires __integral_type convertible to _M_base._M_i.
       __atomic_base(__integral_type __i) { _M_i = __i; }
 
-      operator __integral_type() const volatile
+      operator __integral_type() const
       { return load(); }
 
       __integral_type
       { return load(); }
 
       __integral_type
-      operator=(__integral_type __i) // XXX volatile
+      operator=(__integral_type __i)
       {
        store(__i);
        return __i;
       }
 
       __integral_type
       {
        store(__i);
        return __i;
       }
 
       __integral_type
-      operator++(int) volatile
+      operator++(int)
       { return fetch_add(1); }
 
       __integral_type
       { return fetch_add(1); }
 
       __integral_type
-      operator--(int) volatile
+      operator--(int)
       { return fetch_sub(1); }
 
       __integral_type
       { return fetch_sub(1); }
 
       __integral_type
-      operator++() volatile
+      operator++()
       { return __sync_add_and_fetch(&_M_i, 1); }
 
       __integral_type
       { return __sync_add_and_fetch(&_M_i, 1); }
 
       __integral_type
-      operator--() volatile
+      operator--()
       { return __sync_sub_and_fetch(&_M_i, 1); }
 
       __integral_type
       { return __sync_sub_and_fetch(&_M_i, 1); }
 
       __integral_type
-      operator+=(__integral_type __i) volatile
+      operator+=(__integral_type __i)
       { return __sync_add_and_fetch(&_M_i, __i); }
 
       __integral_type
       { return __sync_add_and_fetch(&_M_i, __i); }
 
       __integral_type
-      operator-=(__integral_type __i) volatile
+      operator-=(__integral_type __i)
       { return __sync_sub_and_fetch(&_M_i, __i); }
 
       __integral_type
       { return __sync_sub_and_fetch(&_M_i, __i); }
 
       __integral_type
-      operator&=(__integral_type __i) volatile
+      operator&=(__integral_type __i)
       { return __sync_and_and_fetch(&_M_i, __i); }
 
       __integral_type
       { return __sync_and_and_fetch(&_M_i, __i); }
 
       __integral_type
-      operator|=(__integral_type __i) volatile
+      operator|=(__integral_type __i)
       { return __sync_or_and_fetch(&_M_i, __i); }
 
       __integral_type
       { return __sync_or_and_fetch(&_M_i, __i); }
 
       __integral_type
-      operator^=(__integral_type __i) volatile
+      operator^=(__integral_type __i)
       { return __sync_xor_and_fetch(&_M_i, __i); }
 
       bool
       { return __sync_xor_and_fetch(&_M_i, __i); }
 
       bool
-      is_lock_free() const volatile
+      is_lock_free() const
       { return true; }
 
       void
       { return true; }
 
       void
-      store(__integral_type __i,
-           memory_order __m = memory_order_seq_cst) volatile
+      store(__integral_type __i, memory_order __m = memory_order_seq_cst)
       {
        __glibcxx_assert(__m != memory_order_acquire);
        __glibcxx_assert(__m != memory_order_acq_rel);
       {
        __glibcxx_assert(__m != memory_order_acquire);
        __glibcxx_assert(__m != memory_order_acq_rel);
@@ -305,7 +304,7 @@ namespace __atomic2
       }
 
       __integral_type
       }
 
       __integral_type
-      load(memory_order __m = memory_order_seq_cst) const volatile
+      load(memory_order __m = memory_order_seq_cst) const 
       {
        __glibcxx_assert(__m != memory_order_release);
        __glibcxx_assert(__m != memory_order_acq_rel);
       {
        __glibcxx_assert(__m != memory_order_release);
        __glibcxx_assert(__m != memory_order_acq_rel);
@@ -317,8 +316,7 @@ namespace __atomic2
       }
 
       __integral_type
       }
 
       __integral_type
-      exchange(__integral_type __i,
-              memory_order __m = memory_order_seq_cst) volatile
+      exchange(__integral_type __i, memory_order __m = memory_order_seq_cst)
       {
        // XXX built-in assumes memory_order_acquire.
        return __sync_lock_test_and_set(&_M_i, __i);
       {
        // XXX built-in assumes memory_order_acquire.
        return __sync_lock_test_and_set(&_M_i, __i);
@@ -326,12 +324,12 @@ namespace __atomic2
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
-                           memory_order __m1, memory_order __m2) volatile
+                           memory_order __m1, memory_order __m2)
       { return compare_exchange_strong(__i1, __i2, __m1, __m2); }
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
       { return compare_exchange_strong(__i1, __i2, __m1, __m2); }
 
       bool
       compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
-                           memory_order __m = memory_order_seq_cst) volatile
+                           memory_order __m = memory_order_seq_cst)
       {
        return compare_exchange_weak(__i1, __i2, __m,
                                     __calculate_memory_order(__m));
       {
        return compare_exchange_weak(__i1, __i2, __m,
                                     __calculate_memory_order(__m));
@@ -339,7 +337,7 @@ namespace __atomic2
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
-                             memory_order __m1, memory_order __m2) volatile
+                             memory_order __m1, memory_order __m2) 
       {
        __glibcxx_assert(__m2 != memory_order_release);
        __glibcxx_assert(__m2 != memory_order_acq_rel);
       {
        __glibcxx_assert(__m2 != memory_order_release);
        __glibcxx_assert(__m2 != memory_order_acq_rel);
@@ -355,7 +353,7 @@ namespace __atomic2
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
 
       bool
       compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
-                             memory_order __m = memory_order_seq_cst) volatile
+                             memory_order __m = memory_order_seq_cst)
       {
        return compare_exchange_strong(__i1, __i2, __m,
                                       __calculate_memory_order(__m));
       {
        return compare_exchange_strong(__i1, __i2, __m,
                                       __calculate_memory_order(__m));
@@ -363,27 +361,27 @@ namespace __atomic2
 
       __integral_type
       fetch_add(__integral_type __i,
 
       __integral_type
       fetch_add(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+               memory_order __m = memory_order_seq_cst)
       { return __sync_fetch_and_add(&_M_i, __i); }
 
       __integral_type
       fetch_sub(__integral_type __i,
       { return __sync_fetch_and_add(&_M_i, __i); }
 
       __integral_type
       fetch_sub(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+               memory_order __m = memory_order_seq_cst) 
       { return __sync_fetch_and_sub(&_M_i, __i); }
 
       __integral_type
       fetch_and(__integral_type __i,
       { return __sync_fetch_and_sub(&_M_i, __i); }
 
       __integral_type
       fetch_and(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+               memory_order __m = memory_order_seq_cst) 
       { return __sync_fetch_and_and(&_M_i, __i); }
 
       __integral_type
       fetch_or(__integral_type __i,
       { return __sync_fetch_and_and(&_M_i, __i); }
 
       __integral_type
       fetch_or(__integral_type __i,
-              memory_order __m = memory_order_seq_cst) volatile
+              memory_order __m = memory_order_seq_cst) 
       { return __sync_fetch_and_or(&_M_i, __i); }
 
       __integral_type
       fetch_xor(__integral_type __i,
       { return __sync_fetch_and_or(&_M_i, __i); }
 
       __integral_type
       fetch_xor(__integral_type __i,
-               memory_order __m = memory_order_seq_cst) volatile
+               memory_order __m = memory_order_seq_cst)
       { return __sync_fetch_and_xor(&_M_i, __i); }
     };
 
       { return __sync_fetch_and_xor(&_M_i, __i); }
     };
 
@@ -399,52 +397,52 @@ namespace __atomic2
     atomic_bool() = default;
     ~atomic_bool() = default;
     atomic_bool(const atomic_bool&) = delete;
     atomic_bool() = default;
     ~atomic_bool() = default;
     atomic_bool(const atomic_bool&) = delete;
-    atomic_bool& operator=(const atomic_bool&) = delete;
+    atomic_bool& operator=(const atomic_bool&) volatile = delete;
 
     atomic_bool(bool __i) : _M_base(__i) { }
 
     bool
 
     atomic_bool(bool __i) : _M_base(__i) { }
 
     bool
-    operator=(bool __i) // XXX volatile
+    operator=(bool __i)
     { return _M_base.operator=(__i); }
 
     { return _M_base.operator=(__i); }
 
-    operator bool() const volatile
+    operator bool() const 
     { return _M_base.load(); }
 
     bool
     { return _M_base.load(); }
 
     bool
-    is_lock_free() const volatile
+    is_lock_free() const
     { return _M_base.is_lock_free(); }
 
     void
     { return _M_base.is_lock_free(); }
 
     void
-    store(bool __i, memory_order __m = memory_order_seq_cst) volatile
+    store(bool __i, memory_order __m = memory_order_seq_cst)
     { _M_base.store(__i, __m); }
 
     bool
     { _M_base.store(__i, __m); }
 
     bool
-    load(memory_order __m = memory_order_seq_cst) const volatile
+    load(memory_order __m = memory_order_seq_cst) const
     { return _M_base.load(__m); }
 
     bool
     { return _M_base.load(__m); }
 
     bool
-    exchange(bool __i, memory_order __m = memory_order_seq_cst) volatile
+    exchange(bool __i, memory_order __m = memory_order_seq_cst)
     { return _M_base.exchange(__i, __m); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
     { return _M_base.exchange(__i, __m); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
-                         memory_order __m2) volatile
+                         memory_order __m2)
     { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2,
     { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
 
     bool
     compare_exchange_weak(bool& __i1, bool __i2,
-                         memory_order __m = memory_order_seq_cst) volatile
+                         memory_order __m = memory_order_seq_cst)
     { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
     { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
-                           memory_order __m2) volatile
+                           memory_order __m2)
     { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
 
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2,
     { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
 
 
     bool
     compare_exchange_strong(bool& __i1, bool __i2,
-                           memory_order __m = memory_order_seq_cst) volatile
+                           memory_order __m = memory_order_seq_cst)
     { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
   };
 } // namespace __atomic2
     { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
   };
 } // namespace __atomic2
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
new file mode 100644 (file)
index 0000000..454699f
--- /dev/null
@@ -0,0 +1,224 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2008, 2009 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_base.h
+ *  This is a Standard C++ Library header.
+ */
+
+#include <bits/c++config.h>
+#include <stddef.h>
+#include <stdbool.h> // XXX need to define bool w/o stdbool.h in tr1/cstdbool
+
+#ifndef _GLIBCXX_ATOMIC_BASE_H
+#define _GLIBCXX_ATOMIC_BASE_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+_GLIBCXX_BEGIN_EXTERN_C
+
+  /**
+   * @defgroup atomics Atomics
+   *
+   * Components for performing atomic operations.
+   * @{
+   */
+
+  /// Enumeration for memory_order
+  typedef enum memory_order
+    {
+      memory_order_relaxed,
+      memory_order_consume,
+      memory_order_acquire,
+      memory_order_release,
+      memory_order_acq_rel,
+      memory_order_seq_cst
+    } memory_order;
+
+  // Base for atomic_flag.
+  typedef struct __atomic_flag_base
+  {
+    bool _M_i;
+  } __atomic_flag_base;
+
+#define ATOMIC_FLAG_INIT { false }
+
+  /// 29.2 Lock-free Property
+#if defined(_GLIBCXX_ATOMIC_BUILTINS_1) && defined(_GLIBCXX_ATOMIC_BUILTINS_2) \
+  && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_ATOMIC_BUILTINS_8)
+# define _GLIBCXX_ATOMIC_PROPERTY 2
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic2
+#elif defined(_GLIBCXX_ATOMIC_BUILTINS_1)
+# define _GLIBCXX_ATOMIC_PROPERTY 1
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic1
+#else
+# define _GLIBCXX_ATOMIC_PROPERTY 0
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic0
+#endif
+
+#define ATOMIC_INTEGRAL_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
+#define ATOMIC_ADDRESS_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
+
+  // Switch atomic integral base types based on C or C++.  In
+  // addition, for "C" only provide type-generic macros for atomic
+  // operations. (As C++ accomplishes the same thing with sets of
+  // overloaded functions.
+#ifdef __cplusplus
+  inline namespace _GLIBCXX_ATOMIC_NAMESPACE { }
+# include <bits/atomicfwd_cxx.h>
+#else
+# include <bits/atomicfwd_c.h>
+#endif
+
+  // Typedefs for other atomic integral types.
+  typedef atomic_schar                 atomic_int_least8_t;
+  typedef atomic_uchar                 atomic_uint_least8_t;
+  typedef atomic_short                 atomic_int_least16_t;
+  typedef atomic_ushort        atomic_uint_least16_t;
+  typedef atomic_int           atomic_int_least32_t;
+  typedef atomic_uint          atomic_uint_least32_t;
+  typedef atomic_llong                 atomic_int_least64_t;
+  typedef atomic_ullong        atomic_uint_least64_t;
+
+  typedef atomic_schar                 atomic_int_fast8_t;
+  typedef atomic_uchar                 atomic_uint_fast8_t;
+  typedef atomic_short                 atomic_int_fast16_t;
+  typedef atomic_ushort        atomic_uint_fast16_t;
+  typedef atomic_int           atomic_int_fast32_t;
+  typedef atomic_uint          atomic_uint_fast32_t;
+  typedef atomic_llong                 atomic_int_fast64_t;
+  typedef atomic_ullong        atomic_uint_fast64_t;
+
+  typedef atomic_long          atomic_intptr_t;
+  typedef atomic_ulong                 atomic_uintptr_t;
+
+  typedef atomic_long          atomic_ssize_t;
+  typedef atomic_ulong                 atomic_size_t;
+
+  typedef atomic_llong                 atomic_intmax_t;
+  typedef atomic_ullong        atomic_uintmax_t;
+
+  typedef atomic_long          atomic_ptrdiff_t;
+
+  // Accessor functions for base atomic_flag type.
+  bool
+  atomic_flag_test_and_set_explicit(__atomic_flag_base*, memory_order)
+  _GLIBCXX_NOTHROW;
+
+  inline bool
+  atomic_flag_test_and_set(__atomic_flag_base* __a)
+  { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
+
+  void
+  atomic_flag_clear_explicit(__atomic_flag_base*, memory_order)
+  _GLIBCXX_NOTHROW;
+
+  inline void
+  atomic_flag_clear(__atomic_flag_base* __a)
+  { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
+
+  void
+  __atomic_flag_wait_explicit(__atomic_flag_base*, memory_order)
+  _GLIBCXX_NOTHROW;
+
+  _GLIBCXX_CONST __atomic_flag_base*
+  __atomic_flag_for_address(const void* __z) _GLIBCXX_NOTHROW;
+
+  // Implementation specific defines.
+#define _ATOMIC_LOAD_(__a, __x)                                                \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                        \
+    atomic_flag* __g = __atomic_flag_for_address(__p);                         \
+    __atomic_flag_wait_explicit(__g, __x);                             \
+    __typeof__ _ATOMIC_MEMBER_ __r = *__p;                             \
+    atomic_flag_clear_explicit(__g, __x);                              \
+    __r; })
+
+#define _ATOMIC_STORE_(__a, __m, __x)                                  \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                        \
+    __typeof__(__m) __v = (__m);                                       \
+    atomic_flag* __g = __atomic_flag_for_address(__p);                         \
+    __atomic_flag_wait_explicit(__g, __x);                             \
+    *__p = __v;                                                                \
+    atomic_flag_clear_explicit(__g, __x);                              \
+    __v; })
+
+#define _ATOMIC_MODIFY_(__a, __o, __m, __x)                            \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                        \
+    __typeof__(__m) __v = (__m);                                       \
+    atomic_flag* __g = __atomic_flag_for_address(__p);                         \
+    __atomic_flag_wait_explicit(__g, __x);                             \
+    __typeof__ _ATOMIC_MEMBER_ __r = *__p;                             \
+    *__p __o __v;                                                      \
+    atomic_flag_clear_explicit(__g, __x);                              \
+    __r; })
+
+#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)                         \
+  ({__typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;                        \
+    __typeof__(__e) __q = (__e);                                       \
+    __typeof__(__m) __v = (__m);                                       \
+    bool __r;                                                          \
+    atomic_flag* __g = __atomic_flag_for_address(__p);                         \
+    __atomic_flag_wait_explicit(__g, __x);                             \
+    __typeof__ _ATOMIC_MEMBER_ __t__ = *__p;                           \
+    if (__t__ == *__q) { *__p = __v; __r = true; }                     \
+    else { *__q = __t__; __r = false; }                                        \
+    atomic_flag_clear_explicit(__g, __x);                              \
+    __r; })
+
+  // @} group atomics
+
+_GLIBCXX_END_EXTERN_C
+_GLIBCXX_END_NAMESPACE
+
+// Inject into global namespace.
+#ifdef __cplusplus
+
+#include <atomic>
+
+using std::memory_order;
+using std::memory_order_relaxed;
+using std::memory_order_consume;
+using std::memory_order_acquire;
+using std::memory_order_release;
+using std::memory_order_acq_rel;
+using std::memory_order_seq_cst;
+using std::atomic_flag;
+using std::atomic_bool;
+using std::atomic_char;
+using std::atomic_schar;
+using std::atomic_uchar;
+using std::atomic_short;
+using std::atomic_ushort;
+using std::atomic_int;
+using std::atomic_uint;
+using std::atomic_long;
+using std::atomic_ulong;
+using std::atomic_llong;
+using std::atomic_ullong;
+using std::atomic_wchar_t;
+using std::atomic_char16_t;
+using std::atomic_char32_t;
+using std::atomic_address;
+using std::atomic;
+#endif
+
+#endif
index eaa45cd..1b24b49 100644 (file)
  *  This is a Standard C++ Library header.
  */
 
  *  This is a Standard C++ Library header.
  */
 
-#include <bits/c++config.h>
-#include <stddef.h>
-#include <stdbool.h> // XXX need to define bool w/o stdbool.h in tr1/cstdbool
+#include <bits/atomic_base.h>
 
 #ifndef _GLIBCXX_STDATOMIC_H
 #define _GLIBCXX_STDATOMIC_H 1
 
 
 #ifndef _GLIBCXX_STDATOMIC_H
 #define _GLIBCXX_STDATOMIC_H 1
 
-_GLIBCXX_BEGIN_NAMESPACE(std)
-_GLIBCXX_BEGIN_EXTERN_C
-
-  /**
-   * @defgroup atomics Atomics
-   *
-   * Components for performing atomic operations.
-   * @{
-   */
-
-  /// Enumeration for memory_order
-  typedef enum memory_order 
-    {
-      memory_order_relaxed, 
-      memory_order_consume, 
-      memory_order_acquire, 
-      memory_order_release,
-      memory_order_acq_rel, 
-      memory_order_seq_cst
-    } memory_order;
-
-  // Base for atomic_flag.
-  typedef struct __atomic_flag_base
-  {
-    bool _M_i;
-  } __atomic_flag_base;
-
-#define ATOMIC_FLAG_INIT { false } 
-
-  /// 29.2 Lock-free Property
-#if defined(_GLIBCXX_ATOMIC_BUILTINS_1) && defined(_GLIBCXX_ATOMIC_BUILTINS_2) \
-  && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_ATOMIC_BUILTINS_8)
-# define _GLIBCXX_ATOMIC_PROPERTY 2
-# define _GLIBCXX_ATOMIC_NAMESPACE __atomic2
-#elif defined(_GLIBCXX_ATOMIC_BUILTINS_1)
-# define _GLIBCXX_ATOMIC_PROPERTY 1
-# define _GLIBCXX_ATOMIC_NAMESPACE __atomic1
-#else
-# define _GLIBCXX_ATOMIC_PROPERTY 0
-# define _GLIBCXX_ATOMIC_NAMESPACE __atomic0
-#endif
-
-#define ATOMIC_INTEGRAL_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
-#define ATOMIC_ADDRESS_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
-
-  // Switch atomic integral base types based on C or C++.  In
-  // addition, for "C" only provide type-generic macros for atomic
-  // operations. (As C++ accomplishes the same thing with sets of
-  // overloaded functions.
-#ifdef __cplusplus
-  inline namespace _GLIBCXX_ATOMIC_NAMESPACE { }
-# include <bits/atomicfwd_cxx.h>
-#else
-# include <bits/atomicfwd_c.h>
-#endif
-  
-  // Typedefs for other atomic integral types.
-  typedef atomic_schar                 atomic_int_least8_t;
-  typedef atomic_uchar                 atomic_uint_least8_t;
-  typedef atomic_short                 atomic_int_least16_t;
-  typedef atomic_ushort        atomic_uint_least16_t;
-  typedef atomic_int           atomic_int_least32_t;
-  typedef atomic_uint          atomic_uint_least32_t;
-  typedef atomic_llong                 atomic_int_least64_t;
-  typedef atomic_ullong        atomic_uint_least64_t;
-
-  typedef atomic_schar                 atomic_int_fast8_t;
-  typedef atomic_uchar                 atomic_uint_fast8_t;
-  typedef atomic_short                 atomic_int_fast16_t;
-  typedef atomic_ushort        atomic_uint_fast16_t;
-  typedef atomic_int           atomic_int_fast32_t;
-  typedef atomic_uint          atomic_uint_fast32_t;
-  typedef atomic_llong                 atomic_int_fast64_t;
-  typedef atomic_ullong        atomic_uint_fast64_t;
-
-  typedef atomic_long          atomic_intptr_t;
-  typedef atomic_ulong                 atomic_uintptr_t;
-
-  typedef atomic_long          atomic_ssize_t;
-  typedef atomic_ulong                 atomic_size_t;
-
-  typedef atomic_llong                 atomic_intmax_t;
-  typedef atomic_ullong        atomic_uintmax_t;
-
-  typedef atomic_long          atomic_ptrdiff_t;
-
-  // Accessor functions for base atomic_flag type.
-  bool 
-  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) _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) _GLIBCXX_NOTHROW;
-  
-  _GLIBCXX_CONST volatile __atomic_flag_base* 
-  __atomic_flag_for_address(const volatile void* __z) _GLIBCXX_NOTHROW;
-
-  // Implementation specific defines.
-#define _ATOMIC_LOAD_(__a, __x)                                                \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;      \
-     volatile atomic_flag* __g = __atomic_flag_for_address(__p);       \
-    __atomic_flag_wait_explicit(__g, __x);                             \
-    __typeof__ _ATOMIC_MEMBER_ __r = *__p;                             \
-    atomic_flag_clear_explicit(__g, __x);                              \
-    __r; })
-
-#define _ATOMIC_STORE_(__a, __m, __x)                                  \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;      \
-    __typeof__(__m) __v = (__m);                                       \
-    volatile atomic_flag* __g = __atomic_flag_for_address(__p);        \
-    __atomic_flag_wait_explicit(__g, __x);                             \
-    *__p = __v;                                                                \
-    atomic_flag_clear_explicit(__g, __x);                              \
-    __v; })
-
-#define _ATOMIC_MODIFY_(__a, __o, __m, __x)                            \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;      \
-    __typeof__(__m) __v = (__m);                                       \
-    volatile atomic_flag* __g = __atomic_flag_for_address(__p);        \
-    __atomic_flag_wait_explicit(__g, __x);                             \
-    __typeof__ _ATOMIC_MEMBER_ __r = *__p;                             \
-    *__p __o __v;                                                      \
-    atomic_flag_clear_explicit(__g, __x);                              \
-    __r; })
-
-#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)                         \
-  ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_;      \
-    __typeof__(__e) __q = (__e);                                       \
-    __typeof__(__m) __v = (__m);                                       \
-    bool __r;                                                          \
-    volatile atomic_flag* __g = __atomic_flag_for_address(__p);        \
-    __atomic_flag_wait_explicit(__g, __x);                             \
-    __typeof__ _ATOMIC_MEMBER_ __t__ = *__p;                           \
-    if (__t__ == *__q) { *__p = __v; __r = true; }                     \
-    else { *__q = __t__; __r = false; }                                        \
-    atomic_flag_clear_explicit(__g, __x);                              \
-    __r; })
-
-  // @} group atomics
-
-_GLIBCXX_END_EXTERN_C
-_GLIBCXX_END_NAMESPACE
-
-// Inject into global namespace.
-#ifdef __cplusplus
-
-#include <cstdatomic>
-
-using std::memory_order;
-using std::memory_order_relaxed;
-using std::memory_order_consume;
-using std::memory_order_acquire;
-using std::memory_order_release;
-using std::memory_order_acq_rel;
-using std::memory_order_seq_cst;
-using std::atomic_flag;
-using std::atomic_bool;
-using std::atomic_char;
-using std::atomic_schar;
-using std::atomic_uchar;
-using std::atomic_short;
-using std::atomic_ushort;
-using std::atomic_int;
-using std::atomic_uint;
-using std::atomic_long;
-using std::atomic_ulong;
-using std::atomic_llong;
-using std::atomic_ullong;
-using std::atomic_wchar_t;
-using std::atomic_char16_t;
-using std::atomic_char32_t;
-using std::atomic_address;
-using std::atomic;
+#ifdef _GLIBCXX_NAMESPACE_C
 #endif
 
 #endif
 #endif
 
 #endif
index 99def36..c19c938 100644 (file)
@@ -53,7 +53,6 @@
 #include <ccomplex>
 #include <cfenv>
 #include <cinttypes>
 #include <ccomplex>
 #include <cfenv>
 #include <cinttypes>
-#include <cstdatomic>
 #include <cstdbool>
 #include <cstdint>
 #include <ctgmath>
 #include <cstdbool>
 #include <cstdint>
 #include <ctgmath>
@@ -97,6 +96,7 @@
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 #include <array>
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 #include <array>
+#include <atomic>
 #include <chrono>
 #include <condition_variable>
 #include <forward_list>
 #include <chrono>
 #include <condition_variable>
 #include <forward_list>
similarity index 63%
rename from libstdc++-v3/include/c_global/cstdatomic
rename to libstdc++-v3/include/std/atomic
index c2aea8f..de75b43 100644 (file)
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
-/** @file cstdatomic
- *  This is a Standard C++ Library file.  You should @c \#include this file
- *  in your programs, rather than any of the "*.h" implementation files.
- *
- *  This is the C++ version of the Standard C Library header @c stdatomic.h,
- *  and its contents are (mostly) the same as that header, but are all
- *  contained in the namespace @c std (except for names which are defined
- *  as macros in C).
+/** @file atomic
+ *  This is a Standard C++ Library header.
  */
 
 // Based on "C++ Atomic Types and Operations" by Hans Boehm and Lawrence Crowl.
 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
 
  */
 
 // Based on "C++ Atomic Types and Operations" by Hans Boehm and Lawrence Crowl.
 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
 
-#ifndef _GLIBCXX_STDATOMIC
-#define _GLIBCXX_STDATOMIC 1
+#ifndef _GLIBCXX_ATOMIC
+#define _GLIBCXX_ATOMIC 1
 
 #pragma GCC system_header
 
 
 #pragma GCC system_header
 
@@ -45,7 +39,7 @@
 # include <c++0x_warning.h>
 #endif
 
 # include <c++0x_warning.h>
 #endif
 
-#include <stdatomic.h>
+#include <bits/atomic_base.h>
 #include <cstddef>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
 #include <cstddef>
 
 _GLIBCXX_BEGIN_NAMESPACE(std)
@@ -57,7 +51,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
   /// kill_dependency
   template<typename _Tp>
 
   /// kill_dependency
   template<typename _Tp>
-    inline _Tp 
+    inline _Tp
     kill_dependency(_Tp __y)
     {
       _Tp ret(__y);
     kill_dependency(_Tp __y)
     {
       _Tp ret(__y);
@@ -76,10 +70,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
   //
   // Three nested namespaces for atomic implementation details.
 
   //
   // Three nested namespaces for atomic implementation details.
-  // 
+  //
   // The nested namespace inlined into std:: is determined by the value
   // of the _GLIBCXX_ATOMIC_PROPERTY macro and the resulting
   // The nested namespace inlined into std:: is determined by the value
   // of the _GLIBCXX_ATOMIC_PROPERTY macro and the resulting
-  // ATOMIC_*_LOCK_FREE macros. See file stdatomic.h.
+  // ATOMIC_*_LOCK_FREE macros. See file atomic_base.h.
   //
   // 0 == __atomic0 == Never lock-free
   // 1 == __atomic1 == Best available, sometimes lock-free
   //
   // 0 == __atomic0 == Never lock-free
   // 1 == __atomic1 == Best available, sometimes lock-free
@@ -99,117 +93,115 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(_Tp __i) : _M_i(__i) { }
 
 
       atomic(_Tp __i) : _M_i(__i) { }
 
-      operator _Tp() const volatile;
+      operator _Tp() const;
 
 
-      _Tp 
-      operator=(_Tp __i) volatile { store(__i); return __i; }
+      _Tp
+      operator=(_Tp __i) { store(__i); return __i; }
 
 
-      bool 
+      bool
       is_lock_free() const volatile;
 
       is_lock_free() const volatile;
 
-      void 
+      void
       store(_Tp, memory_order = memory_order_seq_cst) volatile;
 
       store(_Tp, memory_order = memory_order_seq_cst) volatile;
 
-      _Tp 
+      _Tp
       load(memory_order = memory_order_seq_cst) const volatile;
 
       load(memory_order = memory_order_seq_cst) const volatile;
 
-      _Tp 
+      _Tp
       exchange(_Tp __i, memory_order = memory_order_seq_cst) volatile;
 
       exchange(_Tp __i, memory_order = memory_order_seq_cst) volatile;
 
-      bool 
+      bool
       compare_exchange_weak(_Tp&, _Tp, memory_order, memory_order) volatile;
 
       compare_exchange_weak(_Tp&, _Tp, memory_order, memory_order) volatile;
 
-      bool 
+      bool
       compare_exchange_strong(_Tp&, _Tp, memory_order, memory_order) volatile;
 
       compare_exchange_strong(_Tp&, _Tp, memory_order, memory_order) volatile;
 
-      bool 
-      compare_exchange_weak(_Tp&, _Tp, 
+      bool
+      compare_exchange_weak(_Tp&, _Tp,
                            memory_order = memory_order_seq_cst) volatile;
 
                            memory_order = memory_order_seq_cst) volatile;
 
-      bool 
-      compare_exchange_strong(_Tp&, _Tp, 
+      bool
+      compare_exchange_strong(_Tp&, _Tp,
                              memory_order = memory_order_seq_cst) volatile;
     };
 
 
   /// Partial specialization for pointer types.
                              memory_order = memory_order_seq_cst) volatile;
     };
 
 
   /// Partial specialization for pointer types.
-  template<typename _Tp> 
+  template<typename _Tp>
     struct atomic<_Tp*> : atomic_address
     {
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
     struct atomic<_Tp*> : atomic_address
     {
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(_Tp* __v) : atomic_address(__v) { }
 
 
       atomic(_Tp* __v) : atomic_address(__v) { }
 
-      void 
-      store(_Tp*, memory_order = memory_order_seq_cst) volatile;
+      void
+      store(_Tp*, memory_order = memory_order_seq_cst);
 
 
-      _Tp* 
-      load(memory_order = memory_order_seq_cst) const volatile;
+      _Tp*
+      load(memory_order = memory_order_seq_cst) const;
 
 
-      _Tp* 
-      exchange(_Tp*, memory_order = memory_order_seq_cst) volatile;
+      _Tp*
+      exchange(_Tp*, memory_order = memory_order_seq_cst);
 
 
-      bool 
-      compare_exchange_weak(_Tp*&, _Tp*, memory_order, memory_order) volatile;
+      bool
+      compare_exchange_weak(_Tp*&, _Tp*, memory_order, memory_order);
 
 
-      bool 
-      compare_exchange_strong(_Tp*&, _Tp*, memory_order, memory_order) volatile;
+      bool
+      compare_exchange_strong(_Tp*&, _Tp*, memory_order, memory_order);
 
 
-      bool 
-      compare_exchange_weak(_Tp*&, _Tp*, 
-                           memory_order = memory_order_seq_cst) volatile;
+      bool
+      compare_exchange_weak(_Tp*&, _Tp*, memory_order = memory_order_seq_cst);
 
 
-      bool 
-      compare_exchange_strong(_Tp*&, _Tp*, 
-                             memory_order = memory_order_seq_cst) volatile;
+      bool
+      compare_exchange_strong(_Tp*&, _Tp*, memory_order = memory_order_seq_cst);
 
 
-      _Tp* 
-      fetch_add(ptrdiff_t, memory_order = memory_order_seq_cst) volatile;
+      _Tp*
+      fetch_add(ptrdiff_t, memory_order = memory_order_seq_cst);
 
 
-      _Tp* 
-      fetch_sub(ptrdiff_t, memory_order = memory_order_seq_cst) volatile;
+      _Tp*
+      fetch_sub(ptrdiff_t, memory_order = memory_order_seq_cst);
 
 
-      operator _Tp*() const volatile
+      operator _Tp*() const
       { return load(); }
 
       { return load(); }
 
-      _Tp* 
-      operator=(_Tp* __v) volatile 
-      { 
-       store(__v); 
-       return __v; 
+      _Tp*
+      operator=(_Tp* __v)
+      {
+       store(__v);
+       return __v;
       }
 
       }
 
-      _Tp* 
-      operator++(int) volatile { return fetch_add(1); }
+      _Tp*
+      operator++(int) { return fetch_add(1); }
 
 
-      _Tp* 
-      operator--(int) volatile { return fetch_sub(1); }
+      _Tp*
+      operator--(int) { return fetch_sub(1); }
 
 
-      _Tp* 
-      operator++() volatile { return fetch_add(1) + 1; }
+      _Tp*
+      operator++() { return fetch_add(1) + 1; }
 
 
-      _Tp* 
-      operator--() volatile { return fetch_sub(1) - 1; }
+      _Tp*
+      operator--() { return fetch_sub(1) - 1; }
 
 
-      _Tp* 
-      operator+=(ptrdiff_t __d) volatile 
+      _Tp*
+      operator+=(ptrdiff_t __d)
       { return fetch_add(__d) + __d; }
 
       { return fetch_add(__d) + __d; }
 
-      _Tp* 
-      operator-=(ptrdiff_t __d) volatile 
+      _Tp*
+      operator-=(ptrdiff_t __d)
       { return fetch_sub(__d) - __d; }
     };
 
 
   /// Explicit specialization for void*
       { return fetch_sub(__d) - __d; }
     };
 
 
   /// Explicit specialization for void*
-  template<> 
+  template<>
     struct atomic<void*> : public atomic_address
     {
       typedef void*                    __integral_type;
     struct atomic<void*> : public atomic_address
     {
       typedef void*                    __integral_type;
@@ -218,7 +210,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -227,7 +219,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for bool.
     };
 
   /// Explicit specialization for bool.
-  template<> 
+  template<>
     struct atomic<bool> : public atomic_bool
     {
       typedef bool                     __integral_type;
     struct atomic<bool> : public atomic_bool
     {
       typedef bool                     __integral_type;
@@ -236,7 +228,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -245,7 +237,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for char.
     };
 
   /// Explicit specialization for char.
-  template<> 
+  template<>
     struct atomic<char> : public atomic_char
     {
       typedef char                     __integral_type;
     struct atomic<char> : public atomic_char
     {
       typedef char                     __integral_type;
@@ -254,7 +246,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -263,16 +255,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for signed char.
     };
 
   /// Explicit specialization for signed char.
-  template<> 
+  template<>
     struct atomic<signed char> : public atomic_schar
     struct atomic<signed char> : public atomic_schar
-    { 
+    {
       typedef signed char              __integral_type;
       typedef atomic_schar             __base_type;
 
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       typedef signed char              __integral_type;
       typedef atomic_schar             __base_type;
 
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -281,7 +273,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for unsigned char.
     };
 
   /// Explicit specialization for unsigned char.
-  template<> 
+  template<>
     struct atomic<unsigned char> : public atomic_uchar
     {
       typedef unsigned char            __integral_type;
     struct atomic<unsigned char> : public atomic_uchar
     {
       typedef unsigned char            __integral_type;
@@ -290,7 +282,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -299,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for short.
     };
 
   /// Explicit specialization for short.
-  template<> 
+  template<>
     struct atomic<short> : public atomic_short
     {
       typedef short                    __integral_type;
     struct atomic<short> : public atomic_short
     {
       typedef short                    __integral_type;
@@ -308,7 +300,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -317,7 +309,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for unsigned short.
     };
 
   /// Explicit specialization for unsigned short.
-  template<> 
+  template<>
     struct atomic<unsigned short> : public atomic_ushort
     {
       typedef unsigned short           __integral_type;
     struct atomic<unsigned short> : public atomic_ushort
     {
       typedef unsigned short           __integral_type;
@@ -326,7 +318,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -335,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for int.
     };
 
   /// Explicit specialization for int.
-  template<> 
+  template<>
     struct atomic<int> : atomic_int
     {
       typedef int                      __integral_type;
     struct atomic<int> : atomic_int
     {
       typedef int                      __integral_type;
@@ -344,7 +336,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -353,7 +345,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for unsigned int.
     };
 
   /// Explicit specialization for unsigned int.
-  template<> 
+  template<>
     struct atomic<unsigned int> : public atomic_uint
     {
       typedef unsigned int             __integral_type;
     struct atomic<unsigned int> : public atomic_uint
     {
       typedef unsigned int             __integral_type;
@@ -362,7 +354,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -371,7 +363,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for long.
     };
 
   /// Explicit specialization for long.
-  template<> 
+  template<>
     struct atomic<long> : public atomic_long
     {
       typedef long                     __integral_type;
     struct atomic<long> : public atomic_long
     {
       typedef long                     __integral_type;
@@ -380,7 +372,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -389,7 +381,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for unsigned long.
     };
 
   /// Explicit specialization for unsigned long.
-  template<> 
+  template<>
     struct atomic<unsigned long> : public atomic_ulong
     {
       typedef unsigned long            __integral_type;
     struct atomic<unsigned long> : public atomic_ulong
     {
       typedef unsigned long            __integral_type;
@@ -398,7 +390,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -407,7 +399,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for long long.
     };
 
   /// Explicit specialization for long long.
-  template<> 
+  template<>
     struct atomic<long long> : public atomic_llong
     {
       typedef long long                __integral_type;
     struct atomic<long long> : public atomic_llong
     {
       typedef long long                __integral_type;
@@ -416,7 +408,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -425,7 +417,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for unsigned long long.
     };
 
   /// Explicit specialization for unsigned long long.
-  template<> 
+  template<>
     struct atomic<unsigned long long> : public atomic_ullong
     {
       typedef unsigned long long               __integral_type;
     struct atomic<unsigned long long> : public atomic_ullong
     {
       typedef unsigned long long               __integral_type;
@@ -434,7 +426,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -443,7 +435,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for wchar_t.
     };
 
   /// Explicit specialization for wchar_t.
-  template<> 
+  template<>
     struct atomic<wchar_t> : public atomic_wchar_t
     {
       typedef wchar_t                  __integral_type;
     struct atomic<wchar_t> : public atomic_wchar_t
     {
       typedef wchar_t                  __integral_type;
@@ -452,7 +444,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -461,7 +453,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for char16_t.
     };
 
   /// Explicit specialization for char16_t.
-  template<> 
+  template<>
     struct atomic<char16_t> : public atomic_char16_t
     {
       typedef char16_t                         __integral_type;
     struct atomic<char16_t> : public atomic_char16_t
     {
       typedef char16_t                         __integral_type;
@@ -470,7 +462,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -479,7 +471,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
     };
 
   /// Explicit specialization for char32_t.
     };
 
   /// Explicit specialization for char32_t.
-  template<> 
+  template<>
     struct atomic<char32_t> : public atomic_char32_t
     {
       typedef char32_t                         __integral_type;
     struct atomic<char32_t> : public atomic_char32_t
     {
       typedef char32_t                         __integral_type;
@@ -488,7 +480,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
       atomic() = default;
       ~atomic() = default;
       atomic(const atomic&) = delete;
-      atomic& operator=(const atomic&) = delete;
+      atomic& operator=(const atomic&) volatile = delete;
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
 
       atomic(__integral_type __i) : __base_type(__i) { }
 
@@ -498,212 +490,207 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
 
   template<typename _Tp>
 
 
   template<typename _Tp>
-    _Tp* 
-    atomic<_Tp*>::load(memory_order __m) const volatile
+    _Tp*
+    atomic<_Tp*>::load(memory_order __m) const
     { return static_cast<_Tp*>(atomic_address::load(__m)); }
 
   template<typename _Tp>
     { return static_cast<_Tp*>(atomic_address::load(__m)); }
 
   template<typename _Tp>
-    _Tp* 
-    atomic<_Tp*>::exchange(_Tp* __v, memory_order __m) volatile
+    _Tp*
+    atomic<_Tp*>::exchange(_Tp* __v, memory_order __m)
     { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); }
 
   template<typename _Tp>
     { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); }
 
   template<typename _Tp>
-    bool 
-    atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v, memory_order __m1, 
-                                       memory_order __m2) volatile
-    { 
+    bool
+    atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v, memory_order __m1,
+                                       memory_order __m2)
+    {
       void** __vr = reinterpret_cast<void**>(&__r);
       void* __vv = static_cast<void*>(__v);
       void** __vr = reinterpret_cast<void**>(&__r);
       void* __vv = static_cast<void*>(__v);
-      return atomic_address::compare_exchange_weak(*__vr, __vv, __m1, __m2); 
+      return atomic_address::compare_exchange_weak(*__vr, __vv, __m1, __m2);
     }
 
   template<typename _Tp>
     }
 
   template<typename _Tp>
-    bool 
-    atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v, 
+    bool
+    atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
                                          memory_order __m1,
                                          memory_order __m1,
-                                         memory_order __m2) volatile
-    { 
+                                         memory_order __m2)
+    {
       void** __vr = reinterpret_cast<void**>(&__r);
       void* __vv = static_cast<void*>(__v);
       void** __vr = reinterpret_cast<void**>(&__r);
       void* __vv = static_cast<void*>(__v);
-      return atomic_address::compare_exchange_strong(*__vr, __vv, __m1, __m2); 
+      return atomic_address::compare_exchange_strong(*__vr, __vv, __m1, __m2);
     }
 
   template<typename _Tp>
     }
 
   template<typename _Tp>
-    bool 
+    bool
     atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v,
     atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v,
-                                       memory_order __m) volatile
-    { 
-      return compare_exchange_weak(__r, __v, __m, 
+                                       memory_order __m)
+    {
+      return compare_exchange_weak(__r, __v, __m,
                                   __calculate_memory_order(__m));
     }
 
   template<typename _Tp>
                                   __calculate_memory_order(__m));
     }
 
   template<typename _Tp>
-    bool 
+    bool
     atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
     atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
-                                       memory_order __m) volatile
-    { 
+                                       memory_order __m)
+    {
       return compare_exchange_strong(__r, __v, __m,
                                     __calculate_memory_order(__m));
     }
 
   template<typename _Tp>
       return compare_exchange_strong(__r, __v, __m,
                                     __calculate_memory_order(__m));
     }
 
   template<typename _Tp>
-    _Tp* 
-    atomic<_Tp*>::fetch_add(ptrdiff_t __d, memory_order __m) volatile
-    { 
+    _Tp*
+    atomic<_Tp*>::fetch_add(ptrdiff_t __d, memory_order __m)
+    {
       void* __p = atomic_fetch_add_explicit(this, sizeof(_Tp) * __d, __m);
       return static_cast<_Tp*>(__p);
     }
 
   template<typename _Tp>
       void* __p = atomic_fetch_add_explicit(this, sizeof(_Tp) * __d, __m);
       return static_cast<_Tp*>(__p);
     }
 
   template<typename _Tp>
-    _Tp* 
-    atomic<_Tp*>::fetch_sub(ptrdiff_t __d, memory_order __m) volatile
-    { 
-      void* __p = atomic_fetch_sub_explicit(this, sizeof(_Tp) * __d, __m); 
-      return static_cast<_Tp*>(__p);    
+    _Tp*
+    atomic<_Tp*>::fetch_sub(ptrdiff_t __d, memory_order __m)
+    {
+      void* __p = atomic_fetch_sub_explicit(this, sizeof(_Tp) * __d, __m);
+      return static_cast<_Tp*>(__p);
     }
 
   // Convenience function definitions, atomic_flag.
     }
 
   // Convenience function definitions, atomic_flag.
-  inline bool 
-  atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, memory_order __m)
+  inline bool
+  atomic_flag_test_and_set_explicit(atomic_flag* __a, memory_order __m)
   { return __a->test_and_set(__m); }
 
   { return __a->test_and_set(__m); }
 
-  inline void 
-  atomic_flag_clear_explicit(volatile atomic_flag* __a, memory_order __m)
+  inline void
+  atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m)
   { return __a->clear(__m); }
 
 
   // Convenience function definitions, atomic_address.
   { return __a->clear(__m); }
 
 
   // Convenience function definitions, atomic_address.
-  inline bool 
-  atomic_is_lock_free(const volatile atomic_address* __a)
+  inline bool
+  atomic_is_lock_free(const atomic_address* __a)
   { return __a->is_lock_free(); }
 
   { return __a->is_lock_free(); }
 
-  inline void 
-  atomic_store(volatile atomic_address* __a, void* __v)
+  inline void
+  atomic_store(atomic_address* __a, void* __v)
   { __a->store(__v); }
 
   { __a->store(__v); }
 
-  inline void 
-  atomic_store_explicit(volatile atomic_address* __a, void* __v, 
-                       memory_order __m)
+  inline void
+  atomic_store_explicit(atomic_address* __a, void* __v, memory_order __m)
   { __a->store(__v, __m); }
 
   { __a->store(__v, __m); }
 
-  inline void* 
-  atomic_load(const volatile atomic_address* __a)
+  inline void*
+  atomic_load(const atomic_address* __a)
   { return __a->load(); }
 
   { return __a->load(); }
 
-  inline void* 
-  atomic_load_explicit(const volatile atomic_address* __a, memory_order __m)
+  inline void*
+  atomic_load_explicit(const atomic_address* __a, memory_order __m)
   { return __a->load(__m); }
 
   { return __a->load(__m); }
 
-  inline void* 
-  atomic_exchange(volatile atomic_address* __a, void* __v)
+  inline void*
+  atomic_exchange(atomic_address* __a, void* __v)
   { return __a->exchange(__v); }
 
   { return __a->exchange(__v); }
 
-  inline void* 
-  atomic_exchange_explicit(volatile atomic_address* __a, void* __v, 
-                          memory_order __m)
+  inline void*
+  atomic_exchange_explicit(atomic_address* __a, void* __v, memory_order __m)
   { return __a->exchange(__v, __m); }
 
   { return __a->exchange(__v, __m); }
 
-  inline bool 
-  atomic_compare_exchange_weak(volatile atomic_address* __a, 
-                              void** __v1, void* __v2)
-  { 
-    return __a->compare_exchange_weak(*__v1, __v2, memory_order_seq_cst, 
-                                     memory_order_seq_cst); 
+  inline bool
+  atomic_compare_exchange_weak(atomic_address* __a, void** __v1, void* __v2)
+  {
+    return __a->compare_exchange_weak(*__v1, __v2, memory_order_seq_cst,
+                                     memory_order_seq_cst);
   }
 
   }
 
-  inline bool 
-  atomic_compare_exchange_strong(volatile atomic_address* __a, 
+  inline bool
+  atomic_compare_exchange_strong(atomic_address* __a,
                               void** __v1, void* __v2)
                               void** __v1, void* __v2)
-  { 
-    return __a->compare_exchange_strong(*__v1, __v2, memory_order_seq_cst, 
-                                     memory_order_seq_cst); 
+  {
+    return __a->compare_exchange_strong(*__v1, __v2, memory_order_seq_cst,
+                                     memory_order_seq_cst);
   }
 
   }
 
-  inline bool 
-  atomic_compare_exchange_weak_explicit(volatile atomic_address* __a, 
-                                       void** __v1, void* __v2, 
+  inline bool
+  atomic_compare_exchange_weak_explicit(atomic_address* __a,
+                                       void** __v1, void* __v2,
                                        memory_order __m1, memory_order __m2)
   { return __a->compare_exchange_weak(*__v1, __v2, __m1, __m2); }
 
                                        memory_order __m1, memory_order __m2)
   { return __a->compare_exchange_weak(*__v1, __v2, __m1, __m2); }
 
-  inline bool 
-  atomic_compare_exchange_strong_explicit(volatile atomic_address* __a, 
-                                       void** __v1, void* __v2, 
-                                       memory_order __m1, memory_order __m2)
+  inline bool
+  atomic_compare_exchange_strong_explicit(atomic_address* __a,
+                                         void** __v1, void* __v2,
+                                         memory_order __m1, memory_order __m2)
   { return __a->compare_exchange_strong(*__v1, __v2, __m1, __m2); }
 
   { return __a->compare_exchange_strong(*__v1, __v2, __m1, __m2); }
 
-  inline void* 
-  atomic_fetch_add_explicit(volatile atomic_address* __a, ptrdiff_t __d, 
+  inline void*
+  atomic_fetch_add_explicit(atomic_address* __a, ptrdiff_t __d,
                            memory_order __m)
   { return __a->fetch_add(__d, __m); }
 
                            memory_order __m)
   { return __a->fetch_add(__d, __m); }
 
-  inline void* 
-  atomic_fetch_add(volatile atomic_address* __a, ptrdiff_t __d)
+  inline void*
+  atomic_fetch_add(atomic_address* __a, ptrdiff_t __d)
   { return __a->fetch_add(__d); }
 
   { return __a->fetch_add(__d); }
 
-  inline void* 
-  atomic_fetch_sub_explicit(volatile atomic_address* __a, ptrdiff_t __d, 
+  inline void*
+  atomic_fetch_sub_explicit(atomic_address* __a, ptrdiff_t __d,
                            memory_order __m)
   { return __a->fetch_sub(__d, __m); }
 
                            memory_order __m)
   { return __a->fetch_sub(__d, __m); }
 
-  inline void* 
-  atomic_fetch_sub(volatile atomic_address* __a, ptrdiff_t __d)
+  inline void*
+  atomic_fetch_sub(atomic_address* __a, ptrdiff_t __d)
   { return __a->fetch_sub(__d); }
 
 
   // Convenience function definitions, atomic_bool.
   { return __a->fetch_sub(__d); }
 
 
   // Convenience function definitions, atomic_bool.
-  inline bool 
-  atomic_is_lock_free(const volatile atomic_bool* __a)
+  inline bool
+  atomic_is_lock_free(const atomic_bool* __a)
   { return __a->is_lock_free(); }
 
   { return __a->is_lock_free(); }
 
-  inline void 
-  atomic_store(volatile atomic_bool* __a, bool __i)
+  inline void
+  atomic_store(atomic_bool* __a, bool __i)
   { __a->store(__i); }
 
   { __a->store(__i); }
 
-  inline void 
-  atomic_store_explicit(volatile atomic_bool* __a, bool __i, memory_order __m)
+  inline void
+  atomic_store_explicit(atomic_bool* __a, bool __i, memory_order __m)
   { __a->store(__i, __m); }
 
   { __a->store(__i, __m); }
 
-  inline bool 
-  atomic_load(const volatile atomic_bool* __a)
+  inline bool
+  atomic_load(const atomic_bool* __a)
   { return __a->load(); }
 
   { return __a->load(); }
 
-  inline bool 
-  atomic_load_explicit(const volatile atomic_bool* __a, memory_order __m)
+  inline bool
+  atomic_load_explicit(const atomic_bool* __a, memory_order __m)
   { return __a->load(__m); }
 
   { return __a->load(__m); }
 
-  inline bool 
-  atomic_exchange(volatile atomic_bool* __a, bool __i)
+  inline bool
+  atomic_exchange(atomic_bool* __a, bool __i)
   { return __a->exchange(__i); }
 
   { return __a->exchange(__i); }
 
-  inline bool 
-  atomic_exchange_explicit(volatile atomic_bool* __a, bool __i, 
-                          memory_order __m)
+  inline bool
+  atomic_exchange_explicit(atomic_bool* __a, bool __i, memory_order __m)
   { return __a->exchange(__i, __m); }
 
   { return __a->exchange(__i, __m); }
 
-  inline bool 
-  atomic_compare_exchange_weak(volatile atomic_bool* __a, bool* __i1, bool __i2)
-  { 
-    return __a->compare_exchange_weak(*__i1, __i2, memory_order_seq_cst, 
-                                     memory_order_seq_cst); 
+  inline bool
+  atomic_compare_exchange_weak(atomic_bool* __a, bool* __i1, bool __i2)
+  {
+    return __a->compare_exchange_weak(*__i1, __i2, memory_order_seq_cst,
+                                     memory_order_seq_cst);
   }
 
   }
 
-  inline bool 
-  atomic_compare_exchange_strong(volatile atomic_bool* __a, 
-                                bool* __i1, bool __i2)
-  { 
-    return __a->compare_exchange_strong(*__i1, __i2, memory_order_seq_cst, 
-                                       memory_order_seq_cst); 
+  inline bool
+  atomic_compare_exchange_strong(atomic_bool* __a, bool* __i1, bool __i2)
+  {
+    return __a->compare_exchange_strong(*__i1, __i2, memory_order_seq_cst,
+                                       memory_order_seq_cst);
   }
 
   }
 
-  inline bool 
-  atomic_compare_exchange_weak_explicit(volatile atomic_bool* __a, bool* __i1, 
-                                       bool __i2, memory_order __m1, 
+  inline bool
+  atomic_compare_exchange_weak_explicit(atomic_bool* __a, bool* __i1,
+                                       bool __i2, memory_order __m1,
                                        memory_order __m2)
   { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
 
                                        memory_order __m2)
   { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
 
-  inline bool 
-  atomic_compare_exchange_strong_explicit(volatile atomic_bool* __a, 
-                                         bool* __i1, bool __i2, 
+  inline bool
+  atomic_compare_exchange_strong_explicit(atomic_bool* __a,
+                                         bool* __i1, bool __i2,
                                          memory_order __m1, memory_order __m2)
   { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
 
                                          memory_order __m1, memory_order __m2)
   { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
 
@@ -712,131 +699,129 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
   // Free standing functions. Template argument should be constricted
   // to intergral types as specified in the standard.
   template<typename _ITp>
   // Free standing functions. Template argument should be constricted
   // to intergral types as specified in the standard.
   template<typename _ITp>
-    inline void 
-    atomic_store_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 
-                         memory_order __m)
+    inline void
+    atomic_store_explicit(__atomic_base<_ITp>* __a, _ITp __i, memory_order __m)
     { __a->store(__i, __m); }
 
   template<typename _ITp>
     inline _ITp
     { __a->store(__i, __m); }
 
   template<typename _ITp>
     inline _ITp
-    atomic_load_explicit(const volatile __atomic_base<_ITp>* __a, 
-                        memory_order __m)
-    { return __a->load(__m); } 
+    atomic_load_explicit(const __atomic_base<_ITp>* __a, memory_order __m)
+    { return __a->load(__m); }
 
   template<typename _ITp>
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_exchange_explicit(volatile __atomic_base<_ITp>* __a, 
-                            _ITp __i, memory_order __m)
-    { return __a->exchange(__i, __m); } 
+    inline _ITp
+    atomic_exchange_explicit(__atomic_base<_ITp>* __a, _ITp __i,
+                            memory_order __m)
+    { return __a->exchange(__i, __m); }
 
   template<typename _ITp>
 
   template<typename _ITp>
-    inline bool 
-    atomic_compare_exchange_weak_explicit(volatile __atomic_base<_ITp>* __a, 
-                                         _ITp* __i1, _ITp __i2, 
+    inline bool
+    atomic_compare_exchange_weak_explicit(__atomic_base<_ITp>* __a,
+                                         _ITp* __i1, _ITp __i2,
                                          memory_order __m1, memory_order __m2)
     { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
 
   template<typename _ITp>
                                          memory_order __m1, memory_order __m2)
     { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
 
   template<typename _ITp>
-    inline bool 
-    atomic_compare_exchange_strong_explicit(volatile __atomic_base<_ITp>* __a, 
-                                           _ITp* __i1, _ITp __i2, 
-                                           memory_order __m1, 
+    inline bool
+    atomic_compare_exchange_strong_explicit(__atomic_base<_ITp>* __a,
+                                           _ITp* __i1, _ITp __i2,
+                                           memory_order __m1,
                                            memory_order __m2)
     { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
 
   template<typename _ITp>
                                            memory_order __m2)
     { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 
+    inline _ITp
+    atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i,
                              memory_order __m)
     { return __a->fetch_add(__i, __m); }
 
   template<typename _ITp>
                              memory_order __m)
     { return __a->fetch_add(__i, __m); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 
+    inline _ITp
+    atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i,
                              memory_order __m)
     { return __a->fetch_sub(__i, __m); }
 
   template<typename _ITp>
                              memory_order __m)
     { return __a->fetch_sub(__i, __m); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 
+    inline _ITp
+    atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i,
                              memory_order __m)
     { return __a->fetch_and(__i, __m); }
 
   template<typename _ITp>
                              memory_order __m)
     { return __a->fetch_and(__i, __m); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+    inline _ITp
+    atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i,
                             memory_order __m)
     { return __a->fetch_or(__i, __m); }
 
   template<typename _ITp>
                             memory_order __m)
     { return __a->fetch_or(__i, __m); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 
+    inline _ITp
+    atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i,
                              memory_order __m)
     { return __a->fetch_xor(__i, __m); }
 
   template<typename _ITp>
                              memory_order __m)
     { return __a->fetch_xor(__i, __m); }
 
   template<typename _ITp>
-    inline bool 
-    atomic_is_lock_free(const volatile __atomic_base<_ITp>* __a)
+    inline bool
+    atomic_is_lock_free(const __atomic_base<_ITp>* __a)
     { return __a->is_lock_free(); }
 
   template<typename _ITp>
     { return __a->is_lock_free(); }
 
   template<typename _ITp>
-    inline void 
-    atomic_store(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline void
+    atomic_store(__atomic_base<_ITp>* __a, _ITp __i)
     { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
     { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_load(const volatile __atomic_base<_ITp>* __a)
+    inline _ITp
+    atomic_load(const __atomic_base<_ITp>* __a)
     { return atomic_load_explicit(__a, memory_order_seq_cst); }
 
   template<typename _ITp>
     { return atomic_load_explicit(__a, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_exchange(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline _ITp
+    atomic_exchange(__atomic_base<_ITp>* __a, _ITp __i)
     { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
     { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline bool 
-    atomic_compare_exchange_weak(volatile __atomic_base<_ITp>* __a,
+    inline bool
+    atomic_compare_exchange_weak(__atomic_base<_ITp>* __a,
                                 _ITp* __i1, _ITp __i2)
                                 _ITp* __i1, _ITp __i2)
-    { 
-      return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 
+    {
+      return atomic_compare_exchange_weak_explicit(__a, __i1, __i2,
                                                   memory_order_seq_cst,
                                                   memory_order_seq_cst,
-                                                  memory_order_seq_cst); 
+                                                  memory_order_seq_cst);
     }
 
   template<typename _ITp>
     }
 
   template<typename _ITp>
-    inline bool 
-    atomic_compare_exchange_strong(volatile __atomic_base<_ITp>* __a, 
+    inline bool
+    atomic_compare_exchange_strong(__atomic_base<_ITp>* __a,
                                   _ITp* __i1, _ITp __i2)
                                   _ITp* __i1, _ITp __i2)
-    { 
-      return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 
+    {
+      return atomic_compare_exchange_strong_explicit(__a, __i1, __i2,
                                                     memory_order_seq_cst,
                                                     memory_order_seq_cst,
-                                                    memory_order_seq_cst); 
+                                                    memory_order_seq_cst);
     }
 
   template<typename _ITp>
     }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline _ITp
+    atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i)
     { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
     { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline _ITp
+    atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i)
     { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
     { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline _ITp
+    atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i)
     { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
     { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline _ITp
+    atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i)
     { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
     { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
 
   template<typename _ITp>
-    inline _ITp 
-    atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i)
+    inline _ITp
+    atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i)
     { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
 
   // @} group atomics
     { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
 
   // @} group atomics
@@ -844,5 +829,3 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 _GLIBCXX_END_NAMESPACE
 
 #endif
 _GLIBCXX_END_NAMESPACE
 
 #endif
-
-
index 8f9975d..44f2ec8 100644 (file)
@@ -41,7 +41,7 @@
 #include <condition_variable>
 #include <system_error>
 #include <exception>
 #include <condition_variable>
 #include <system_error>
 #include <exception>
-#include <cstdatomic>
+#include <atomic>
 #include <bits/functexcept.h>
 
 namespace std
 #include <bits/functexcept.h>
 
 namespace std
index 775bb76..bff8fa9 100644 (file)
@@ -24,7 +24,7 @@
 // <http://www.gnu.org/licenses/>.
 
 #include "gstdint.h"
 // <http://www.gnu.org/licenses/>.
 
 #include "gstdint.h"
-#include <cstdatomic>
+#include <atomic>
 #include <mutex>
 
 #define LOGSIZE 4
 #include <mutex>
 
 #define LOGSIZE 4
@@ -40,7 +40,7 @@ namespace
   }
 #endif
 
   }
 #endif
 
-  std::__atomic_flag_base volatile flag_table[ 1 << LOGSIZE ] =
+  std::__atomic_flag_base flag_table[ 1 << LOGSIZE ] =
     {
       ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT,
       ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT,
     {
       ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT,
       ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT, ATOMIC_FLAG_INIT,
@@ -54,7 +54,7 @@ namespace std
   namespace __atomic0
   {
     bool
   namespace __atomic0
   {
     bool
-    atomic_flag::test_and_set(memory_order) volatile
+    atomic_flag::test_and_set(memory_order)
     {
 #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
       lock_guard<mutex> __lock(get_atomic_mutex());
     {
 #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
       lock_guard<mutex> __lock(get_atomic_mutex());
@@ -65,7 +65,7 @@ namespace std
     }
 
     void
     }
 
     void
-    atomic_flag::clear(memory_order) volatile
+    atomic_flag::clear(memory_order)
     {
 #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
       lock_guard<mutex> __lock(get_atomic_mutex());
     {
 #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
       lock_guard<mutex> __lock(get_atomic_mutex());
@@ -77,31 +77,31 @@ namespace std
   extern "C"
   {
     bool
   extern "C"
   {
     bool
-    atomic_flag_test_and_set_explicit(volatile __atomic_flag_base* __a,
+    atomic_flag_test_and_set_explicit(__atomic_flag_base* __a,
                                      memory_order __m) throw ()
     {
                                      memory_order __m) throw ()
     {
-      volatile atomic_flag* d = static_cast<volatile atomic_flag*>(__a);
+      atomic_flag* d = static_cast<volatile atomic_flag*>(__a);
       return d->test_and_set(__m);
     }
 
     void
       return d->test_and_set(__m);
     }
 
     void
-    atomic_flag_clear_explicit(volatile __atomic_flag_base* __a,
+    atomic_flag_clear_explicit(__atomic_flag_base* __a,
                               memory_order __m) throw ()
     {
                               memory_order __m) throw ()
     {
-      volatile atomic_flag* d = static_cast<volatile atomic_flag*>(__a);
+      atomic_flag* d = static_cast<volatile atomic_flag*>(__a);
       return d->clear(__m);
     }
 
     void
       return d->clear(__m);
     }
 
     void
-    __atomic_flag_wait_explicit(volatile __atomic_flag_base* __a,
+    __atomic_flag_wait_explicit(__atomic_flag_base* __a,
                                memory_order __x) throw ()
     {
       while (atomic_flag_test_and_set_explicit(__a, __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) throw ()
+    __atomic_flag_base*
+    __atomic_flag_for_address(const void* __z) throw ()
     {
       uintptr_t __u = reinterpret_cast<uintptr_t>(__z);
       __u += (__u >> 2) + (__u << 4);
     {
       uintptr_t __u = reinterpret_cast<uintptr_t>(__z);
       __u += (__u >> 2) + (__u << 4);
@@ -114,3 +114,24 @@ namespace std
     }
   } // extern "C"
 } // namespace std
     }
   } // extern "C"
 } // namespace std
+
+
+// XXX GLIBCXX_ABI Deprecated
+// gcc-4.5.0
+// <atomic> signature changes
+
+// The rename syntax for default exported names is
+//   asm (".symver name1,exportedname@GLIBCXX_3.4")
+//   asm (".symver name2,exportedname@@GLIBCXX_3.4.5")
+// In the future, GLIBCXX_ABI > 6 should remove all uses of
+// _GLIBCXX_*_SYMVER macros in this file.
+
+#define _GLIBCXX_ASM_SYMVER(cur, old, version) \
+   asm (".symver " #cur "," #old "@@" #version);
+
+#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
+    && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)
+_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag5clearESt12memory_order, _ZNVSt9__atomic011atomic_flag5clearESt12memory_order, GLIBCXX_3.4.11)
+
+_GLIBCXX_ASM_SYMVER(_ZNSt9__atomic011atomic_flag12test_and_setESt12memory_order, _ZNVSt9__atomic011atomic_flag12test_and_setESt12memory_order, GLIBCXX_3.4.11)
+#endif
index df28eca..5d6e5dd 100644 (file)
 
 namespace std
 {
 
 namespace std
 {
+  // gcc-4.4.0
+  // <mutex> exported std::lock_error
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+  class lock_error : public exception
+  {
+  public:
+    virtual const char*
+    _GLIBCXX_CONST what() const throw();
+  };
+
+  const char*
+  lock_error::what() const throw()
+  { return "std::lock_error"; }
+#endif
+
   // We need these due to the symbols exported since GLIBCXX_3.4.10.
   // See libstdc++/41662 for details.
   // We need these due to the symbols exported since GLIBCXX_3.4.10.
   // See libstdc++/41662 for details.
-
   template<typename _Tp>
     struct hash : public std::unary_function<_Tp, size_t>
     {
   template<typename _Tp>
     struct hash : public std::unary_function<_Tp, size_t>
     {
index c81f08e..41071d2 100644 (file)
@@ -513,25 +513,6 @@ extern __attribute__((used, weak)) const void * const _ZTIPKe[4]
       (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
 
       (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
 
-// gcc-4.4.0
-// <mutex> exported std::lock_error
-#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
-namespace std
-{
-  class lock_error : public exception
-  {
-  public:
-    virtual const char*
-    _GLIBCXX_CONST what() const throw();
-  };
-
-  const char*
-  lock_error::what() const throw()
-  { return "std::lock_error"; }
-}
-#endif
-
-
 #ifdef _GLIBCXX_SYMVER_DARWIN
 #if (defined(__ppc__) || defined(__ppc64__)) && defined(PIC)
 /* __eprintf shouldn't have been made visible from libstdc++, or
 #ifdef _GLIBCXX_SYMVER_DARWIN
 #if (defined(__ppc__) || defined(__ppc64__)) && defined(PIC)
 /* __eprintf shouldn't have been made visible from libstdc++, or
index e580d80..8769fa6 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
@@ -30,19 +29,19 @@ int main()
 }
 
 // { dg-error "used here" "" { target *-*-* } 521 }
 }
 
 // { dg-error "used here" "" { target *-*-* } 521 }
-// { dg-error "deleted function" "" { target *-*-* } 239 }
-// { dg-error "deleted function" "" { target *-*-* } 257 }
-// { dg-error "deleted function" "" { target *-*-* } 275 } 
-// { dg-error "deleted function" "" { target *-*-* } 293 }
-// { dg-error "deleted function" "" { target *-*-* } 311 }
-// { dg-error "deleted function" "" { target *-*-* } 329 }
-// { dg-error "deleted function" "" { target *-*-* } 347 }
-// { dg-error "deleted function" "" { target *-*-* } 365 }
-// { dg-error "deleted function" "" { target *-*-* } 383 }
-// { dg-error "deleted function" "" { target *-*-* } 401 }
-// { dg-error "deleted function" "" { target *-*-* } 419 }
-// { dg-error "deleted function" "" { target *-*-* } 437 }
-// { dg-error "deleted function" "" { target *-*-* } 455 }
-// { dg-error "deleted function" "" { target *-*-* } 473 }
-// { dg-error "deleted function" "" { target *-*-* } 491 }
+// { dg-error "deleted function" "" { target *-*-* } 231 }
+// { dg-error "deleted function" "" { target *-*-* } 249 }
+// { dg-error "deleted function" "" { target *-*-* } 267 }
+// { dg-error "deleted function" "" { target *-*-* } 285 }
+// { dg-error "deleted function" "" { target *-*-* } 303 }
+// { dg-error "deleted function" "" { target *-*-* } 321 }
+// { dg-error "deleted function" "" { target *-*-* } 339 }
+// { dg-error "deleted function" "" { target *-*-* } 357 }
+// { dg-error "deleted function" "" { target *-*-* } 375 }
+// { dg-error "deleted function" "" { target *-*-* } 393 }
+// { dg-error "deleted function" "" { target *-*-* } 411 }
+// { dg-error "deleted function" "" { target *-*-* } 429 }
+// { dg-error "deleted function" "" { target *-*-* } 447 }
+// { dg-error "deleted function" "" { target *-*-* } 465 }
+// { dg-error "deleted function" "" { target *-*-* } 483 }
 // { dg-excess-errors "In member function" }
 // { dg-excess-errors "In member function" }
index f6ca51d..142a5a1 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::copy_list_initializable test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::copy_list_initializable test;
-  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), 
+  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index 9108b4b..7f7cfd0 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
@@ -29,20 +28,20 @@ int main()
   return 0;
 }
 
   return 0;
 }
 
-// { dg-error "used here" "" { target *-*-* } 560 } 
-// { dg-error "deleted function" "" { target *-*-* } 238 }
-// { dg-error "deleted function" "" { target *-*-* } 256 }
-// { dg-error "deleted function" "" { target *-*-* } 274 }
-// { dg-error "deleted function" "" { target *-*-* } 292 }
-// { dg-error "deleted function" "" { target *-*-* } 310 }
-// { dg-error "deleted function" "" { target *-*-* } 328 }
-// { dg-error "deleted function" "" { target *-*-* } 346 }
-// { dg-error "deleted function" "" { target *-*-* } 364 }
-// { dg-error "deleted function" "" { target *-*-* } 382 }
-// { dg-error "deleted function" "" { target *-*-* } 400 }
-// { dg-error "deleted function" "" { target *-*-* } 418 }
-// { dg-error "deleted function" "" { target *-*-* } 436 }
-// { dg-error "deleted function" "" { target *-*-* } 454 }
-// { dg-error "deleted function" "" { target *-*-* } 472 }
-// { dg-error "deleted function" "" { target *-*-* } 490 }
+// { dg-error "used here" "" { target *-*-* } 560 }
+// { dg-error "deleted function" "" { target *-*-* } 248 }
+// { dg-error "deleted function" "" { target *-*-* } 266 }
+// { dg-error "deleted function" "" { target *-*-* } 284 }
+// { dg-error "deleted function" "" { target *-*-* } 302 }
+// { dg-error "deleted function" "" { target *-*-* } 320 }
+// { dg-error "deleted function" "" { target *-*-* } 338 }
+// { dg-error "deleted function" "" { target *-*-* } 356 }
+// { dg-error "deleted function" "" { target *-*-* } 374 }
+// { dg-error "deleted function" "" { target *-*-* } 230 }
+// { dg-error "deleted function" "" { target *-*-* } 410 }
+// { dg-error "deleted function" "" { target *-*-* } 428 }
+// { dg-error "deleted function" "" { target *-*-* } 446 }
+// { dg-error "deleted function" "" { target *-*-* } 464 }
+// { dg-error "deleted function" "" { target *-*-* } 482 }
+// { dg-error "deleted function" "" { target *-*-* } 392 }
 // { dg-excess-errors "In member function" }
 // { dg-excess-errors "In member function" }
index 114e1f4..bdad02b 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index e7eefcc..b6ac8e1 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::direct_list_initializable test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::direct_list_initializable test;
-  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), 
+  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index 2f476b6..7557820 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::single_value_constructible test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::single_value_constructible test;
-  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), 
+  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/user_pod.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/user_pod.cc
new file mode 100644 (file)
index 0000000..4ace9f0
--- /dev/null
@@ -0,0 +1,39 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do link { xfail *-*-* } }
+
+// Copyright (C) 2009 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <atomic>
+
+struct dwordp
+{
+  int* p1;
+  int* p2;
+};
+
+void atomics()
+{
+  std::atomic<dwordp> a;
+  bool b = a.is_lock_free(); // { dg-excess-errors "undefined reference to" }
+}
+
+int main()
+{
+  atomics();
+  return 0;
+}
index 8189b0f..6acf7c8 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::integral_assignable test;
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::integral_assignable test;
-  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), 
+  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index 0884f76..1c9c768 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::integral_convertable test;
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::integral_convertable test;
-  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(), 
+  __gnu_cxx::typelist::apply_generator(test, __gnu_test::atomics_tl(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index 4d297a1..946f833 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 {
   // Check for required base class.
   __gnu_test::has_required_base_class test;
 #include <testsuite_common_types.h>
 
 void test01()
 {
   // Check for required base class.
   __gnu_test::has_required_base_class test;
-  __gnu_cxx::typelist::apply_generator(test, 
-                                      __gnu_test::atomic_integrals::type(), 
-                                       __gnu_test::atomics_tl());
+  __gnu_cxx::typelist::apply_generator(test,
+                                      __gnu_test::atomic_integrals::type(),
+                                      __gnu_test::atomics_tl());
 }
 }
index cba7ae8..72bd5dd 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
 // This file tests explicit instantiation of basic_string
 
 // This file tests explicit instantiation of basic_string
 
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_character.h>
 
 template class std::atomic<__gnu_test::pod_char>;
 #include <testsuite_character.h>
 
 template class std::atomic<__gnu_test::pod_char>;
index 8fbcef7..fa35b9c 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index 18da8bf..0ec1321 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 void test01()
 {
 
 void test01()
 {
@@ -29,5 +28,5 @@ void test01()
   test_type t2;
   t1 = t2;
 }
   test_type t2;
   t1 = t2;
 }
-// { dg-error "used here" "" { target *-*-* } 30 } 
-// { dg-excess-errors "deleted function" } 
+// { dg-error "used here" "" { target *-*-* } 29 }
+// { dg-excess-errors "deleted function" }
index e56c8cc..4ede58f 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 void test01()
 {
 
 void test01()
 {
@@ -28,5 +27,5 @@ void test01()
   test_type t1;
   test_type t2(t1);
 }
   test_type t1;
   test_type t2(t1);
 }
-// { dg-error "used here" "" { target *-*-* } 29 } 
-// { dg-excess-errors "deleted function" } 
+// { dg-error "used here" "" { target *-*-* } 28 }
+// { dg-excess-errors "deleted function" }
index 1fc6f8a..7e08ebb 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index 543e518..7a2e949 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index e33c5ea..cbabc1e 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 #include <testsuite_common_types.h>
 
 void test01()
index 8125910..0096080 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 #include <testsuite_common_types.h>
 
 void test01()
index 6cb09f3..36dc5fc 100644 (file)
@@ -17,7 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_hooks.h>
 
 int main()
 #include <testsuite_hooks.h>
 
 int main()
index 91abf85..1ad8bc4 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-options "-std=gnu++0x" }
-// { dg-do compile } 
+// { dg-do compile }
 
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 //
 
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 //
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index 7238831..924add8 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 void test01()
 {
 
 void test01()
 {
@@ -29,5 +28,5 @@ void test01()
   test_type t2;
   t1 = t2;
 }
   test_type t2;
   t1 = t2;
 }
-// { dg-error "used here" "" { target *-*-* } 30 } 
-// { dg-excess-errors "deleted function" } 
+// { dg-error "used here" "" { target *-*-* } 29 }
+// { dg-excess-errors "deleted function" }
index 5af9ea9..22cea6a 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 void test01()
 {
 
 void test01()
 {
@@ -28,5 +27,5 @@ void test01()
   test_type t1;
   test_type t2(t1);
 }
   test_type t1;
   test_type t2(t1);
 }
-// { dg-error "used here" "" { target *-*-* } 29 } 
-// { dg-excess-errors "deleted function" } 
+// { dg-error "used here" "" { target *-*-* } 28 }
+// { dg-excess-errors "deleted function" }
index df6d7dc..38b6544 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index fbeea17..362b8d4 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 #include <testsuite_common_types.h>
 
 void test01()
index 59b9db8..41e275c 100644 (file)
@@ -18,8 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 #include <testsuite_common_types.h>
 
 void test01()
index d52da44..025fdcb 100644 (file)
@@ -17,7 +17,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
 #include <stdatomic.h>
 
 int main()
 #include <stdatomic.h>
 
 int main()
index d51dc46..ef69e02 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index 87f320a..1ab9294 100644 (file)
@@ -17,7 +17,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
 #include <stdatomic.h>
 
 int main()
 #include <stdatomic.h>
 
 int main()
index 9bac4a0..825174d 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 
 int main()
 {
 
 int main()
 {
index cf69ab2..d21e30c 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::assignable test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::assignable test;
-  __gnu_cxx::typelist::apply_generator(test, 
+  __gnu_cxx::typelist::apply_generator(test,
                                       __gnu_test::atomic_integrals::type());
   return 0;
 }
 
 // { dg-error "used here" "" { target *-*-* } 521 }
                                       __gnu_test::atomic_integrals::type());
   return 0;
 }
 
 // { dg-error "used here" "" { target *-*-* } 521 }
-// { dg-excess-errors "deleted function" } 
-// { dg-excess-errors "deleted function" } 
-// { dg-error "instantiated from" "" { target *-*-* } 29 } 
-// { dg-error "instantiated from" "" { target *-*-* } 528 } 
-// { dg-error "instantiated from" "" { target *-*-* } 170 } 
+// { dg-excess-errors "deleted function" }
+// { dg-excess-errors "deleted function" }
+// { dg-error "instantiated from" "" { target *-*-* } 28 }
+// { dg-error "instantiated from" "" { target *-*-* } 528 }
+// { dg-error "instantiated from" "" { target *-*-* } 170 }
 // { dg-error "instantiated from" "" { target *-*-* } 399 }
 // { dg-error "instantiated from" "" { target *-*-* } 399 }
-// { dg-error "instantiated from" "" { target *-*-* } 168 }  
+// { dg-error "instantiated from" "" { target *-*-* } 168 }
 // { dg-excess-errors "In member function" }
 // { dg-excess-errors "In member function" }
index 517c7fe..f245636 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index 369cba8..be0580a 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::copy_constructible test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::copy_constructible test;
-  __gnu_cxx::typelist::apply_generator(test, 
+  __gnu_cxx::typelist::apply_generator(test,
                                       __gnu_test::atomic_integrals::type());
   return 0;
 }
 
 // { dg-error "used here" "" { target *-*-* } 560 }
                                       __gnu_test::atomic_integrals::type());
   return 0;
 }
 
 // { dg-error "used here" "" { target *-*-* } 560 }
-// { dg-excess-errors "deleted function" } 
-// { dg-excess-errors "deleted function" } 
-// { dg-error "instantiated from" "" { target *-*-* } 29 } 
-// { dg-error "instantiated from" "" { target *-*-* } 566 } 
-// { dg-error "instantiated from" "" { target *-*-* } 170 } 
+// { dg-excess-errors "deleted function" }
+// { dg-excess-errors "deleted function" }
+// { dg-error "instantiated from" "" { target *-*-* } 28 }
+// { dg-error "instantiated from" "" { target *-*-* } 566 }
+// { dg-error "instantiated from" "" { target *-*-* } 170 }
 // { dg-error "instantiated from" "" { target *-*-* } 399 }
 // { dg-error "instantiated from" "" { target *-*-* } 399 }
-// { dg-error "instantiated from" "" { target *-*-* } 168 }  
+// { dg-error "instantiated from" "" { target *-*-* } 168 }
 // { dg-excess-errors "In member function" }
 // { dg-excess-errors "In member function" }
index 174b789..613e935 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index 7a30fc6..3e8f9c3 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::direct_list_initializable test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::direct_list_initializable test;
-  __gnu_cxx::typelist::apply_generator(test, 
-                                      __gnu_test::atomic_integrals::type(), 
+  __gnu_cxx::typelist::apply_generator(test,
+                                      __gnu_test::atomic_integrals::type(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index a2b473e..8787a15 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::single_value_constructible test;
 #include <testsuite_common_types.h>
 
 int main()
 {
   __gnu_test::single_value_constructible test;
-  __gnu_cxx::typelist::apply_generator(test, 
-                                      __gnu_test::atomic_integrals::type(), 
+  __gnu_cxx::typelist::apply_generator(test,
+                                      __gnu_test::atomic_integrals::type(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index 44fb712..99940b8 100644 (file)
@@ -1,25 +1,24 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
+
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
+
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
+
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
-#include <cstdatomic>
+
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index dcea4cf..c7a5dc3 100644 (file)
@@ -1,25 +1,24 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
+
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
+
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
+
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
-#include <cstdatomic>
+
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index edfc7e8..fd26644 100644 (file)
@@ -1,25 +1,24 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
+
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
+
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
+
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
-#include <cstdatomic>
+
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index 940b067..5959828 100644 (file)
@@ -1,25 +1,24 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
+
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
+
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
+
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
-#include <cstdatomic>
+
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index bac73f0..e1e8690 100644 (file)
@@ -1,25 +1,24 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
+
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
+
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
+
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
-#include <cstdatomic>
+
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index 555f1a9..9cff377 100644 (file)
@@ -1,25 +1,24 @@
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
 // { dg-options "-std=gnu++0x" }
 // { dg-do compile }
 // -*- C++ -*-
+
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 // Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 // published by the Free Software Foundation; either version 3, or (at
 // your option) any later version.
+
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
 // This library is distributed in the hope that it will be useful, but
 // WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // General Public License for more details.
+
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 // You should have received a copy of the GNU General Public License
 // along with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
-#include <cstdatomic>
+
+#include <atomic>
 #include <testsuite_common_types.h>
 
 int main()
 #include <testsuite_common_types.h>
 
 int main()
index 062339a..728b53a 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
@@ -26,7 +25,7 @@ int main()
 {
   __gnu_test::integral_assignable test;
   __gnu_cxx::typelist::apply_generator(test,
 {
   __gnu_test::integral_assignable test;
   __gnu_cxx::typelist::apply_generator(test,
-                                      __gnu_test::atomic_integrals::type(), 
+                                      __gnu_test::atomic_integrals::type(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index fb9c7c4..ab642f3 100644 (file)
@@ -17,8 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
 #include <testsuite_hooks.h>
 #include <testsuite_common_types.h>
 
@@ -26,7 +25,7 @@ int main()
 {
   __gnu_test::integral_convertable test;
   __gnu_cxx::typelist::apply_generator(test,
 {
   __gnu_test::integral_convertable test;
   __gnu_cxx::typelist::apply_generator(test,
-                                      __gnu_test::atomic_integrals::type(), 
+                                      __gnu_test::atomic_integrals::type(),
                                       __gnu_test::integral_types::type());
   return 0;
 }
                                       __gnu_test::integral_types::type());
   return 0;
 }
index c9b81a3..66e231b 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 {
   // Check for standard layout requirements
   __gnu_test::standard_layout test;
 #include <testsuite_common_types.h>
 
 void test01()
 {
   // Check for standard layout requirements
   __gnu_test::standard_layout test;
-  __gnu_cxx::typelist::apply_generator(test, 
+  __gnu_cxx::typelist::apply_generator(test,
                                       __gnu_test::atomic_integrals::type());
 }
                                       __gnu_test::atomic_integrals::type());
 }
index e5e8579..f75fcb0 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-
-#include <cstdatomic>
+#include <atomic>
 #include <testsuite_common_types.h>
 
 void test01()
 {
   __gnu_test::has_trivial_cons_dtor test;
 #include <testsuite_common_types.h>
 
 void test01()
 {
   __gnu_test::has_trivial_cons_dtor test;
-  __gnu_cxx::typelist::apply_generator(test, 
+  __gnu_cxx::typelist::apply_generator(test,
                                       __gnu_test::atomic_integrals::type());
 }
                                       __gnu_test::atomic_integrals::type());
 }
@@ -18,7 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>
+#include <atomic>
 
 namespace gnu
 {
 
 namespace gnu
 {
@@ -18,7 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>
+#include <atomic>
 
 namespace gnu
 {
 
 namespace gnu
 {
@@ -18,7 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>  // { dg-excess-errors "In file included from" }
+#include <atomic>  // { dg-excess-errors "In file included from" }
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
 
 // { dg-error "upcoming ISO" "" { target *-*-* } 31 } 
 
@@ -18,7 +18,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <cstdatomic>
+#include <atomic>
 
 void test01()
 {
 
 void test01()
 {
diff --git a/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc b/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc
new file mode 100644 (file)
index 0000000..cbdb5e6
--- /dev/null
@@ -0,0 +1,78 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2009 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <atomic>
+
+void test01()
+{
+  // Not global scoped, only namespace std.
+  using memory_order;
+  using memory_order_relaxed;
+  using memory_order_consume;
+  using memory_order_acquire;
+  using memory_order_release;
+  using memory_order_acq_rel;
+  using memory_order_seq_cst;
+
+  using atomic_flag;
+
+  using atomic_bool;
+  using atomic_char;
+  using atomic_schar;
+  using atomic_uchar;
+  using atomic_short;
+  using atomic_ushort;
+  using atomic_int;
+  using atomic_uint;
+  using atomic_long;
+  using atomic_ulong;
+  using atomic_llong;
+  using atomic_ullong;
+  using atomic_wchar_t;
+  using atomic_char16_t;
+  using atomic_char32_t;
+
+  using atomic_address;
+}
+
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 26 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 27 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 28 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 29 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 30 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 31 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 32 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 34 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 36 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 37 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 38 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 39 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 40 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 41 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 42 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 43 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 44 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 45 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 46 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 47 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 48 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 49 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 50 }
+// { dg-error "expected nested-name-specifier" "" { target *-*-* } 52 }
index 9c9fe7d..d569376 100644 (file)
@@ -22,8 +22,8 @@
 
 int main()
 {
 
 int main()
 {
-  volatile atomic_flag f;
-  volatile atomic_flag* p = &f;
+  atomic_flag f;
+  atomic_flag* p = &f;
   memory_order m = memory_order_relaxed;
 
   // For position only.
   memory_order m = memory_order_relaxed;
 
   // For position only.
index a6c58be..ac2684a 100644 (file)
@@ -44,7 +44,7 @@
 #include <tr1/unordered_set>
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 #include <tr1/unordered_set>
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
-#include <cstdatomic>
+#include <atomic>
 #include <type_traits>
 #endif
 
 #include <type_traits>
 #endif