File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -verify=c11,both -std=c11 %s
2
+ // RUN: %clang_cc1 -verify=c23,both -std=c23 %s
3
+
4
+ /* WG14 N1518: Clang 15
5
+ * Recommendations for extended identifier characters for C and C++
6
+ *
7
+ * This paper effectively adopts UAX #31, which was later officially adopted
8
+ * for C23 via WG14 N2836 and supersedes N1518.
9
+ */
10
+
11
+ // This file takes test cases from clang/test/C/C23/n2836_n2939.c.
12
+ // This file contains Unicode characters; please do not "fix" them!
13
+
14
+ // This was fine in C11, is now an error in C23.
15
+ extern int ٢; // c23-error {{character <U+0662> not allowed at the start of an identifier}} \
16
+ c23-warning {{declaration does not declare anything}}
17
+
18
+ // This was an error in C11 but is an extension in C23.
19
+ extern int ∞; // c11-error {{unexpected character <U+221E>}} \
20
+ c11-warning {{declaration does not declare anything}} \
21
+ c23-warning {{mathematical notation character <U+221E> in an identifier is a Clang extension}}
22
+
23
+ int \u1DC0 ; // both-error {{expected identifier or '('}}
24
+ int e\u1DC0 ; // Ok
Original file line number Diff line number Diff line change @@ -1105,7 +1105,7 @@ <h2 id="c11">C11 implementation status</h2>
1105
1105
< tr >
1106
1106
< td > Recommendations for extended identifier characters for C and C++</ td >
1107
1107
< td > < a href ="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1518.htm "> N1518</ a > </ td >
1108
- < td class ="unknown " align ="center "> Unknown </ td >
1108
+ < td class ="full " align ="center "> Clang 15 </ td >
1109
1109
</ tr >
1110
1110
< tr >
1111
1111
< td > Atomic C1x/C++0x compatibility refinements (1st part only)</ td >
You can’t perform that action at this time.
0 commit comments