* diagnostic behavior, not runtime behavior. Also, both are a matter of QoI as
* to what they optimize/diagnose. But if someone thinks of a way to test this,
* we can add a test case for it then.
+ *
+ * WG14 DR448: yes
+ * What are the semantics of a # non-directive?
+ *
+ * WG14 DR454: yes
+ * ATOMIC_VAR_INIT (issues 3 and 4)
+ *
+ * WG14 DR455: yes
+ * ATOMIC_VAR_INIT issue 5
+ *
+ * WG14 DR459: yes
+ * atomic_load missing const qualifier
*/
/* WG14 DR412: yes
*/
_Alignas(int) _Alignas(double) int k;
}
+
+/* WG14 DR447: yes
+ * Boolean from complex
+ *
+ * Ensure that the imaginary part contributes to the conversion to bool, not
+ * just the real part.
+ */
+_Static_assert((_Bool)0.0 + 3.0 * (__extension__ 1.0iF), ""); /* c89only-warning {{'_Bool' is a C99 extension}}
+ expected-warning {{expression is not an integer constant expression; folding it to a constant is a GNU extension}}
+ */
+_Static_assert(!(_Bool)0.0 + 0.0 * (__extension__ 1.0iF), ""); /* c89only-warning {{'_Bool' is a C99 extension}}
+ expected-warning {{expression is not an integer constant expression; folding it to a constant is a GNU extension}}
+ */
+
+/* WG14 DR463: yes
+ * Left-shifting into the sign bit
+ *
+ * This DR was NAD and leaves shifting a bit into the high bit of a signed
+ * integer type undefined behavior, unlike in C++. Note, the diagnostic is also
+ * issued in C++ for shifting into that bit despite being well-defined because
+ * the code is questionable and should be validated by the programmer.
+ */
+void dr463(void) {
+ (void)(1 << (__CHAR_BIT__ * sizeof(int))); /* expected-warning {{shift count >= width of type}} */
+ (void)(1 << ((__CHAR_BIT__ * sizeof(int)) - 1));
+}
+
+/* WG14 DR464: yes
+ * Clarifying the Behavior of the #line Directive
+ *
+ * Note: the behavior described by this DR allows for two different
+ * interpretations, but WG14 N2322 (adopted for C2x) adds a recommended
+ * practice which is what we're testing our interpretation against.
+ */
+#line 10000
+_Static_assert(__LI\
+NE__ == 10000, "");
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_447">447</a></td>
<td>C11</td>
<td>Boolean from complex</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="448">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_448">448</a></td>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_456">456</a></td>
<td>Dup</td>
<td>Compile time definition of UINTN_C(value)</td>
- <td class="na" align="center">Duplicate of <a href="#209">209</a></td>
+ <td class="partial" align="center">Duplicate of <a href="#209">209</a></td>
</tr>
<tr id="457">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_457">457</a></td>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_459">459</a></td>
<td>C11</td>
<td>atomic_load missing const qualifier</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="460">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_460">460</a></td>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_463">463</a></td>
<td>NAD</td>
<td>Left-shifting into the sign bit</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="464">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_464">464</a></td>
<td>C11</td>
<td>Clarifying the Behavior of the #line Directive</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr id="465">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm#dr_465">465</a></td>