[clang] 61a649c - Update the status of more C DRs
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 15 12:25:55 PDT 2022
Author: Aaron Ballman
Date: 2022-06-15T15:25:47-04:00
New Revision: 61a649ca3556b24c88f5697660a850b7486ad691
URL: https://github.com/llvm/llvm-project/commit/61a649ca3556b24c88f5697660a850b7486ad691
DIFF: https://github.com/llvm/llvm-project/commit/61a649ca3556b24c88f5697660a850b7486ad691.diff
LOG: Update the status of more C DRs
This adds information for DRs 126 through 146.
Added:
Modified:
clang/test/C/drs/dr1xx.c
clang/www/c_dr_status.html
Removed:
################################################################################
diff --git a/clang/test/C/drs/dr1xx.c b/clang/test/C/drs/dr1xx.c
index e7343c0e3573..fed5fdd69101 100644
--- a/clang/test/C/drs/dr1xx.c
+++ b/clang/test/C/drs/dr1xx.c
@@ -31,6 +31,24 @@
*
* WG14 DR125: yes
* Using things declared as 'extern (qualified) void'
+ *
+ * WG14 DR127: dup 013
+ * Composite type of an enumerated type and an integral type
+ *
+ * WG14 DR132: dup 109
+ * Can undefined behavior occur at translation time, or only at run time?
+ *
+ * WG14 DR133: yes
+ * Undefined behavior not previously listed in subclause G2
+ *
+ * WG14 DR138: yes
+ * Is there an allocated storage duration?
+ *
+ * WG14 DR139: yes
+ * Compatibility of complete and incomplete types
+ *
+ * WG14 DR146: yes
+ * Nugatory constraint
*/
@@ -231,3 +249,81 @@ void dr124(void) {
/* A cast can cast to void or any qualified version of void. */
(const volatile void)0;
}
+
+/* WG14 DR126: yes
+ * What does 'synonym' mean with respect to typedef names?
+ */
+void dr126(void) {
+ typedef int *IP;
+ const IP object; /* expected-note {{variable 'object' declared const here}} */
+
+ /* The root of the DR is whether 'object' is a pointer to a const int, or a
+ * const pointer to int.
+ */
+ *object = 12; /* ok */
+ ++object; /* expected-error {{cannot assign to variable 'object' with const-qualified type 'const IP' (aka 'int *const')}} */
+}
+
+/* WG14 DR128: yes
+ * Editorial issue relating to tag declarations in type specifiers
+ */
+void dr128(void) {
+ {
+ struct TAG { int i; };
+ }
+ {
+ struct TAG object; /* expected-error {{variable has incomplete type 'struct TAG'}}
+ expected-note {{forward declaration of 'struct TAG'}}
+ */
+ }
+}
+
+/* WG14 DR129: yes
+ * Tags and name spaces
+ */
+struct dr129_t { int i; };
+void dr129(void) {
+ enum dr129_t { enumerator }; /* expected-note {{previous use is here}} */
+ void *vp;
+
+ (void)(struct dr129_t *)vp; /* expected-error {{use of 'dr129_t' with tag type that does not match previous declaration}} */
+}
+
+/* WG14 DR131: yes
+ * const member qualification and assignment
+ */
+void dr131(void) {
+ struct S {
+ const int i; /* expected-note {{data member 'i' declared const here}} */
+ } s1, s2;
+ s1 = s2; /* expected-error {{cannot assign to variable 's1' with const-qualified data member 'i'}} */
+}
+
+/* WG14 DR142: yes
+ * Reservation of macro names
+ */
+void dr142(void) {
+#include <stddef.h>
+/* FIXME: undefining a macro defined by the standard library is undefined
+ * behavior. We have diagnostics when declaring reserved identifiers, and we
+ * could consider extending that to undefining a macro defined in a system
+ * header. However, whether we diagnose or not, we conform.
+ */
+#undef NULL
+}
+
+/* WG14 DR144: yes
+ * Preprocessing of preprocessing directives
+ */
+#define DR144
+# DR144 include <stddef.h> /* expected-error {{invalid preprocessing directive}} */
+DR144 # include <stddef.h> /* expected-error {{expected identifier or '('}} */
+
+/* WG14 DR145: yes
+ * Constant expressions
+ */
+void dr145(void) {
+ static int array[10];
+ static int *ip = (int *)0;
+ static int i = array[0] + array[1]; /* expected-error {{initializer element is not a compile-time constant}} */
+}
diff --git a/clang/www/c_dr_status.html b/clang/www/c_dr_status.html
index 75709d418a83..0b16bd55b299 100644
--- a/clang/www/c_dr_status.html
+++ b/clang/www/c_dr_status.html
@@ -811,25 +811,25 @@ <h2 id="cdr">C defect report implementation status</h2>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_126.html">126</a></td>
<td>NAD</td>
<td>What does 'synonym' mean with respect to typedef names?</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="127">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_127.html">127</a></td>
<td>Dup</td>
<td>Composite type of an enumerated type and an integral type</td>
- <td class="unknown" align="center">Duplicate of <a href="#13">13</a></td>
+ <td class="full" align="center">Duplicate of <a href="#13">13</a></td>
</tr>
<tr id="128">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_128.html">128</a></td>
<td>NAD</td>
<td>Editorial issue relating to tag declarations in type specifiers</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="129">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_129.html">129</a></td>
<td>NAD</td>
<td>Tags and name spaces</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="130">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_130.html">130</a></td>
@@ -841,19 +841,19 @@ <h2 id="cdr">C defect report implementation status</h2>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_131.html">131</a></td>
<td>C89</td>
<td>const member qualification and assignment</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="132">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_132.html">132</a></td>
<td>Dup</td>
<td>Can undefined behavior occur at translation time, or only at run time?</td>
- <td class="unknown" align="center">Duplicate of <a href="#109">109</a></td>
+ <td class="full" align="center">Duplicate of <a href="#109">109</a></td>
</tr>
<tr id="133">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_133.html">133</a></td>
<td>NAD</td>
<td>Undefined behavior not previously listed in subclause G2</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="134">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_134.html">134</a></td>
@@ -883,13 +883,13 @@ <h2 id="cdr">C defect report implementation status</h2>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_138.html">138</a></td>
<td>C89</td>
<td>Is there an allocated storage duration?</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="139">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_139.html">139</a></td>
<td>C89</td>
<td>Compatibility of complete and incomplete types</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="140">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_140.html">140</a></td>
@@ -907,7 +907,7 @@ <h2 id="cdr">C defect report implementation status</h2>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_142.html">142</a></td>
<td>C89</td>
<td>Reservation of macro names</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="143">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_143.html">143</a></td>
@@ -919,19 +919,19 @@ <h2 id="cdr">C defect report implementation status</h2>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_144.html">144</a></td>
<td>C89</td>
<td>Preprocessing of preprocessing directives</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="145">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_145.html">145</a></td>
<td>C89</td>
<td>Constant expressions</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="146">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_146.html">146</a></td>
<td>C89</td>
<td>Nugatory constraint</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="147">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_147.html">147</a></td>
More information about the cfe-commits
mailing list