Skip to content

Commit 2c8b824

Browse files
committed
[C2y] Claim conformance to WG14 N3478
This paper made it a constraint violation for a TU to end with an unterminated multiline comment. This is something Clang has always diagnosed as an error.
1 parent e22579a commit 2c8b824

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

clang/test/C/C2y/n3478.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %clang_cc1 -verify -std=c2y %s
2+
// RUN: %clang_cc1 -verify -std=c23 %s
3+
4+
/* WG14 N3478: Yes
5+
* Slay Some Earthly Demons XIII
6+
*
7+
* It was previously UB to end a source file with a partial preprocessing token
8+
* or a partial comment. Clang has always diagnosed these.
9+
*/
10+
11+
// expected-error@+1 {{unterminated /* comment}}
12+
/*

clang/www/c_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ <h2 id="c2y">C2y implementation status</h2>
299299
<tr>
300300
<td>Slay Some Earthly Demons XIII</td>
301301
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3478.pdf">N3478</a></td>
302-
<td class="unknown" align="center">Unknown</td>
302+
<td class="full" align="center">Yes</td>
303303
</tr>
304304
<tr>
305305
<td>Slay Some Earthly Demons XIV</td>

0 commit comments

Comments
 (0)