Test a few more C99 DRs

This updates the status for another 8 DRs.
This commit is contained in:
Aaron Ballman 2022-07-01 13:47:08 -04:00
parent 291e3a8565
commit 6450daddd2
2 changed files with 65 additions and 8 deletions

View file

@ -17,6 +17,21 @@
*
* WG14 DR215: yes
* Equality operators
*
* WG14 DR218: yes
* Signs of non-numeric floating point values
*
* WG14 DR219: yes
* Effective types
*
* WG14 DR221: yes
* Lacuna in pointer arithmetic
*
* WG14 DR222: yes
* Partially initialized structures
*
* WG14 DR234: yes
* Miscellaneous Typos
*/
@ -87,3 +102,45 @@ void dr216(void) {
A('}'); A('~');
#undef A
}
/* WG14 DR230: yes
* Enumerated type rank
*/
void dr230(void) {
enum E {
Value = __INT_MAX__
} e;
/* The enumeration type has a compatible type that is a signed or unsigned
* integer type, or char. But it has to be large enough to hold all of the
* values of the enumerators. So it needs to be at least int or unsigned int.
*
* The integer conversion rank for an enumeration is the same as its
* compatible type (C99 6.3.1.1p1), so it's eligible for integer promotions
* to either int or unsigned int, depending on the compatible type
* (C99 6.3.1.1p2).
*/
(void)_Generic(e, int : 1, unsigned int : 1);
(void)_Generic((enum E)Value, int : 1, unsigned int : 1);
/* The enumerators themselves have type int (C99 6.7.2.2p3). */
(void)_Generic(Value, int : 1);
}
/* WG14 DR231: no
* Semantics of text-line and non-directive
*
* One of the preprocessing groups to support is # non-directive (C99 6.10p1),
* which is defined as pp-tokens followed by a newline. However, we fail to
* translate the program if we don't recognize the directive, and we don't take
* note when what follows the # is not a valid preprocessing token.
*/
/* FIXME: this should not fail. */
# nope /* expected-error {{invalid preprocessing directive}} */
/* FIXME: this should fail, but not because of the unknown directive; it should
* fail because of the invalid preprocessing-token.
*/
# 'a
/* expected-error@-1 {{invalid preprocessing directive}} \
expected-warning@-1 {{missing terminating ' character}}
*/

View file

@ -1242,13 +1242,13 @@ conformance.</p>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_218.htm">218</a></td>
<td>C99</td>
<td>Signs of non-numeric floating point values</td>
<td class="unknown" align="center">Unknown</td>
<td class="full" align="center">Yes</td>
</tr>
<tr id="219">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_219.htm">219</a></td>
<td>NAD</td>
<td>Effective types</td>
<td class="unknown" align="center">Unknown</td>
<td class="full" align="center">Yes</td>
</tr>
<tr id="220">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_220.htm">220</a></td>
@ -1260,13 +1260,13 @@ conformance.</p>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_221.htm">221</a></td>
<td>NAD</td>
<td>Lacuna in pointer arithmetic</td>
<td class="unknown" align="center">Unknown</td>
<td class="full" align="center">Yes</td>
</tr>
<tr id="222">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_222.htm">222</a></td>
<td>C99</td>
<td>Partially initialized structures</td>
<td class="unknown" align="center">Unknown</td>
<td class="full" align="center">Yes</td>
</tr>
<tr id="223">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_223.htm">223</a></td>
@ -1290,7 +1290,7 @@ conformance.</p>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_226.htm">226</a></td>
<td>NAD</td>
<td>strftime references</td>
<td class="full" align="center">Yes</td>
<td class="na" align="center">N/A</td>
</tr>
<tr id="227">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_227.htm">227</a></td>
@ -1314,19 +1314,19 @@ conformance.</p>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_230.htm">230</a></td>
<td>C99</td>
<td>Enumerated type rank</td>
<td class="unknown" align="center">Unknown</td>
<td class="full" align="center">Yes</td>
</tr>
<tr id="231">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_231.htm">231</a></td>
<td>NAD</td>
<td>Semantics of text-line and non-directive</td>
<td class="unknown" align="center">Unknown</td>
<td class="none" align="center">No</td>
</tr>
<tr id="232">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_232.htm">232</a></td>
<td>C99</td>
<td>Typo in Annex I</td>
<td class="full" align="center">Yes</td>
<td class="na" align="center">N/A</td>
</tr>
<tr id="233">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_233.htm">233</a></td>