25 lines · c
1// RUN: %clang_cc1 -verify=c11,both -std=c11 %s2// RUN: %clang_cc1 -verify=c23,both -std=c23 %s3 4/* WG14 N1518: Clang 155 * Recommendations for extended identifier characters for C and C++6 *7 * This paper effectively adopts UAX #31, which was later officially adopted8 * 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.15extern 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.19extern 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 23int \u1DC0; // both-error {{expected identifier or '('}}24int e\u1DC0; // Ok25