|
| 1 | +<?xml version='1.0' encoding='utf-8' standalone='no'?> |
| 2 | +<!DOCTYPE issue SYSTEM "lwg-issue.dtd"> |
| 3 | + |
| 4 | +<issue num="4247" status="New"> |
| 5 | +<title>Header <tt><stdbit.h></tt> is not yet freestanding</title> |
| 6 | +<section> |
| 7 | +<sref ref="[stdbit.h.syn]"/> |
| 8 | +</section> |
| 9 | +<submitter>Jiang An</submitter> |
| 10 | +<date>24 Apr 2025</date> |
| 11 | +<priority>99</priority> |
| 12 | + |
| 13 | +<discussion> |
| 14 | +<p> |
| 15 | +Per C23/WG14 <a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf#page=22">N3220</a> 4 p7, <tt><stdbit.h></tt> |
| 16 | +is freestanding in C23, but C++ hasn't required it for a freestanding implementation. |
| 17 | +LWG <iref ref="4049"/> is related but doesn't cover this, because there's no <tt><cstdbit></tt> standard header. |
| 18 | +</p> |
| 19 | +</discussion> |
| 20 | + |
| 21 | +<resolution> |
| 22 | +<p> |
| 23 | +This wording is relative to <paper num="N5008"/>. |
| 24 | +</p> |
| 25 | + |
| 26 | +<ol> |
| 27 | + |
| 28 | +<li><p>Modify Table 27 [tab:headers.cpp.fs] as indicated:</p> |
| 29 | + |
| 30 | +<blockquote> |
| 31 | +<table border="1"> |
| 32 | +<caption>Table 27: C++ headers for freestanding implementations [tab:headers.cpp.fs]</caption> |
| 33 | +<tr align="center"> |
| 34 | +<th></th> |
| 35 | +<th>Subclause</th> |
| 36 | +<th>Header</th> |
| 37 | +</tr> |
| 38 | + |
| 39 | +<tr> |
| 40 | +<td colspan="3" align="center"> |
| 41 | +<tt>[…]</tt> |
| 42 | +</td> |
| 43 | +</tr> |
| 44 | + |
| 45 | +<tr> |
| 46 | +<td> |
| 47 | +<sref ref="[bit]"/> |
| 48 | +</td> |
| 49 | +<td> |
| 50 | +Bit manipulation |
| 51 | +</td> |
| 52 | +<td> |
| 53 | +<tt><bit></tt> |
| 54 | +</td> |
| 55 | +</tr> |
| 56 | + |
| 57 | +<tr> |
| 58 | +<td> |
| 59 | +<ins><sref ref="[stdbit.h.syn]"/></ins> |
| 60 | +</td> |
| 61 | +<td> |
| 62 | +<ins>C-compatible bit manipulation</ins> |
| 63 | +</td> |
| 64 | +<td> |
| 65 | +<ins><tt><stdbit.h></tt></ins> |
| 66 | +</td> |
| 67 | +</tr> |
| 68 | + |
| 69 | +<tr> |
| 70 | +<td> |
| 71 | +<sref ref="[array]"/> |
| 72 | +</td> |
| 73 | +<td> |
| 74 | +Class template `array` |
| 75 | +</td> |
| 76 | +<td> |
| 77 | +<tt><array></tt> |
| 78 | +</td> |
| 79 | +</tr> |
| 80 | + |
| 81 | +<tr> |
| 82 | +<td colspan="3" align="center"> |
| 83 | +<tt>[…]</tt> |
| 84 | +</td> |
| 85 | +</tr> |
| 86 | + |
| 87 | +</table> |
| 88 | + |
| 89 | +</blockquote> |
| 90 | + |
| 91 | +</li> |
| 92 | + |
| 93 | +<li><p>Modify <sref ref="[stdbit.h.syn]"/>, header <tt><stdbit.h></tt> synopsis, as indicated:</p> |
| 94 | + |
| 95 | +<blockquote> |
| 96 | +<pre> |
| 97 | +<ins>// all freestanding</ins> |
| 98 | +#define __STDC_VERSION_STDBIT_H__ 202311L |
| 99 | + |
| 100 | +#define __STDC_ENDIAN_BIG__ <i>see below</i> |
| 101 | +#define __STDC_ENDIAN_LITTLE__ <i>see below</i> |
| 102 | +#define __STDC_ENDIAN_NATIVE__ <i>see below</i> |
| 103 | + |
| 104 | +[…] |
| 105 | +</pre> |
| 106 | +</blockquote> |
| 107 | + |
| 108 | +</li> |
| 109 | + |
| 110 | +</ol> |
| 111 | +</resolution> |
| 112 | + |
| 113 | +</issue> |
0 commit comments