LWG 2441 Provide exact-width atomic typedefs
authorJonathan Wakely <jwakely@redhat.com>
Wed, 20 Jul 2016 18:21:59 +0000 (19:21 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 20 Jul 2016 18:21:59 +0000 (19:21 +0100)
* include/std/atomic (atomic_int8_t, atomic_uint8_t, atomic_int16_t)
(atomic_uint16_t, atomic_int32_t, atomic_uint32_t, atomic_int64_t)
(atomic_uint64_t): Define (LWG 2441).
* testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc: Remove empty
lines.
* testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Test for
the new types.
* doc/xml/manual/intro.xml: Document DR 2441 status.

From-SVN: r238534

libstdc++-v3/ChangeLog
libstdc++-v3/doc/xml/manual/intro.xml
libstdc++-v3/include/std/atomic
libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc
libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x.cc

index ad31fe6fdee7d30db8a0ae2b7eca8aebded4b854..c53240be4d7b12f6d20b8701c89437c5e9452de9 100644 (file)
@@ -1,5 +1,14 @@
 2016-07-20  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/std/atomic (atomic_int8_t, atomic_uint8_t, atomic_int16_t)
+       (atomic_uint16_t, atomic_int32_t, atomic_uint32_t, atomic_int64_t)
+       (atomic_uint64_t): Define (LWG 2441).
+       * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc: Remove empty
+       lines.
+       * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Test for
+       the new types.
+       * doc/xml/manual/intro.xml: Document DR 2441 status.
+
        * include/std/istream (operator>>(basic_istream&&, _Tp&)): Adjust
        to use perfect forwarding (LWG 2328).
        * testsuite/27_io/rvalue_streams.cc: Test perfect forwarding.
index 6335614efdbbf5cedc65ef805d9a6287f9af1c67..c6b06561999883911065e9ea1eb5e438efc46050 100644 (file)
@@ -1011,6 +1011,12 @@ requirements of the license of GCC.
     <listitem><para>Add <code>noexcept</code>.
     </para></listitem></varlistentry>
 
+    <varlistentry><term><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../ext/lwg-defects.html#2441">2441</link>:
+       <emphasis>Exact-width atomic typedefs should be provided</emphasis>
+    </term>
+    <listitem><para>Define the typedefs.
+    </para></listitem></varlistentry>
+
     <varlistentry><term><link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="../ext/lwg-defects.html#2454">2454</link>:
        <emphasis>Add <code>raw_storage_iterator::base()</code> member
        </emphasis>
index 8cbc91f93474e1356508fbd540e9fa92021333c5..f8894bf7486f44e121243b6d48039a5d407c25ac 100644 (file)
@@ -833,6 +833,34 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   typedef atomic<char32_t>             atomic_char32_t;
 
 
+  // _GLIBCXX_RESOLVE_LIB_DEFECTS
+  // 2441. Exact-width atomic typedefs should be provided
+
+  /// atomic_int8_t
+  typedef atomic<int8_t>               atomic_int8_t;
+
+  /// atomic_uint8_t
+  typedef atomic<uint8_t>              atomic_uint8_t;
+
+  /// atomic_int16_t
+  typedef atomic<int16_t>              atomic_int16_t;
+
+  /// atomic_uint16_t
+  typedef atomic<uint16_t>             atomic_uint16_t;
+
+  /// atomic_int32_t
+  typedef atomic<int32_t>              atomic_int32_t;
+
+  /// atomic_uint32_t
+  typedef atomic<uint32_t>             atomic_uint32_t;
+
+  /// atomic_int64_t
+  typedef atomic<int64_t>              atomic_int64_t;
+
+  /// atomic_uint64_t
+  typedef atomic<uint64_t>             atomic_uint64_t;
+
+
   /// atomic_int_least8_t
   typedef atomic<int_least8_t>         atomic_int_least8_t;
 
index a13f66ab1e5885c672512abb947af81124429077..1f56f5a58158f07fc2b0633e1c838ec9134e8e56 100644 (file)
@@ -21,6 +21,3 @@
 #include <atomic>
 
 // { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
-
-
-
index 32fe2a4eb1db14bd442ac3656e316b0e574a996c..51adbf578354cb4cbd9a619e2350a11bb632f2a7 100644 (file)
@@ -72,4 +72,14 @@ void test01()
   using std::atomic_ptrdiff_t;
   using std::atomic_intmax_t;
   using std::atomic_uintmax_t;
+
+  // DR 2441
+  using std::atomic_int8_t;
+  using std::atomic_uint8_t;
+  using std::atomic_int16_t;
+  using std::atomic_uint16_t;
+  using std::atomic_int32_t;
+  using std::atomic_uint32_t;
+  using std::atomic_int64_t;
+  using std::atomic_uint64_t;
 }