<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 1456: Missing fixed-size atomic_ typedefs</title>
<meta property="og:title" content="Issue 1456: Missing fixed-size atomic_ typedefs">
<meta property="og:description" content="C++ library issue. Status: NAD">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue1456.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#NAD">NAD</a> status.</em></p>
<h3 id="1456"><a href="lwg-closed.html#1456">1456</a>. Missing fixed-size <code>atomic_</code> typedefs</h3>
<p><b>Section:</b> 32.5 <a href="https://wg21.link/atomics">[atomics]</a> <b>Status:</b> <a href="lwg-active.html#NAD">NAD</a>
 <b>Submitter:</b> BSI <b>Opened:</b> 2010-08-25 <b>Last modified:</b> 2016-01-28</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View all other</b> <a href="lwg-index.html#atomics">issues</a> in [atomics].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#NAD">NAD</a> status.</p>
<p><b>Discussion:</b></p>
<p><b>Addresses GB-129</b></p>
<p>
Table 143 lists the typedefs for various atomic types
corresponding to the various standard integer typedefs,
such as <code>atomic_int_least8_t</code> for <code>int_least8_t</code>, and
<code>atomic_uint_fast64_t</code> for <code>uint_fast64_t</code>. However, there are
no atomic typedefs corresponding to the fixed-size
standard typedefs <code>int8_t</code>, <code>int16_t</code>, and so forth.
</p>
<p><i>[
2010-10-24 Daniel adds:
]</i></p>


<blockquote><p>
Accepting <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3164.html">n3164</a> would solve this issue.
</p></blockquote>

<p><i>[
2011-02-15 Anthony corrects numbering/naming for N3225, Howard suggests improvement for the position
of '(optional)', Daniel reorders rows in harmony to remaining entries and suggests specific optionality
comments:
]</i></p>


<p><i>[2011-02-16 Reflector discussion]</i></p>

<p>
Moved to Tentatively Ready after 5 votes.
</p>

<p><i>[2011-03-16: Hans reopenes and comments]</i></p>


<p>WG14 briefly discussed LWG 1456. It turns out that they had previously made a conscious decision not to make a 
similar change. If C++ would deviate, this would introduce a C divergence.
<p/>
We should reopen the issue and, in my opinion, probably resolve it as NAD instead.  This is in a part of the standard 
that is there mostly for C compatibility, so introducing divergence here seems to make no sense.
</p>

<p><i>[2011-03-24 Madrid]</i></p>

<p><b>Rationale:</b></p><p>
WG14 does not require these typedefs, and we see no reason to be gratuitously different.
</p>



<p id="res-1456"><b>Proposed resolution:</b></p>
<p>
Add the following entries to table 143:
</p>
<blockquote>
<table border="1">
<caption>Table 146 &mdash; <code>atomic</code> <code>&lt;inttypes.h&gt;</code> typedefs</caption>
<tr>
<th>Atomic typedef</th>
<th><code>&lt;inttypes.h&gt;</code> type</th>
</tr>
<tr>
<td><code>...</code></td>
<td><code>...</code></td>
</tr>
<tr>
<td><code>atomic_intmax_t</code></td>
<td><code>intmax_t</code></td>
</tr>
<tr>
<td><code>atomic_uintmax_t</code></td>
<td><code>uintmax_t</code></td>
</tr>
<tr>
<td><ins><code>atomic_int8_t&nbsp;</code>// <em>iff <code>int8_t</code> is provided</em></ins></td>
<td><ins><code>int8_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_uint8_t&nbsp;</code>// <em>iff <code>uint8_t</code> is provided</em></ins></td>
<td><ins><code>uint8_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_int16_t&nbsp;</code>// <em>iff <code>int16_t</code> is provided</em></ins></td>
<td><ins><code>int16_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_uint16_t&nbsp;</code>// <em>iff <code>uint16_t</code> is provided</em></ins></td>
<td><ins><code>uint16_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_int32_t&nbsp;</code>// <em>iff <code>int32_t</code> is provided</em></ins></td>
<td><ins><code>int32_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_uint32_t&nbsp;</code>// <em>iff <code>uint32_t</code> is provided</em></ins></td>
<td><ins><code>uint32_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_int64_t&nbsp;</code>// <em>iff <code>int64_t</code> is provided</em></ins></td>
<td><ins><code>int64_t</code></ins></td>
</tr>
<tr>
<td><ins><code>atomic_uint64_t&nbsp;</code>// <em>iff <code>uint64_t</code> is provided</em></ins></td>
<td><ins><code>uint64_t</code></ins></td>
</tr>
</table>
</blockquote> 





</body>
</html>
