xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_071.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_071.c,v 1.6 2023/01/22 16:05:08 rillig Exp $	*/
2 # 3 "msg_071.c"
3 
4 // Test for message: too many characters in character constant [71]
5 
6 /*
7  * See also:
8  *	lex_char.c
9  *	lex_char_uchar.c
10  *	lex_wide_char.c
11  */
12 
13 /*
14  * C11 6.4.4.4p7 says: Each hexadecimal escape sequence is the longest
15  * sequence of characters that can constitute the escape sequence.
16  */
17 char valid_multi_digit_hex = '\x0000000000000000000000a';
18 /* expect+2: error: too many characters in character constant [71] */
19 /* expect+1: warning: initializer does not fit [178] */
20 char invalid_multi_digit_hex = '\x000g000000000000000000a';
21