msg_075.c revision 1.8
1/* $NetBSD: msg_075.c,v 1.8 2024/02/03 10:01:59 rillig Exp $ */ 2# 3 "msg_075.c" 3 4// Test for message: overflow in hex escape [75] 5 6/* lint1-extra-flags: -X 351 */ 7 8/* 9 * See also: 10 * lex_char.c 11 * lex_char_uchar.c 12 * lex_string.c 13 * lex_wide_char.c 14 * lex_wide_string.c 15 */ 16 17/* expect+1: warning: overflow in hex escape [75] */ 18char str[] = "\x12345678123456781234567812345678"; 19 20/* C11 6.4.4.4p7 */ 21char leading_zeroes = '\x0000000000000000000000000000020'; 22 23char char_hex1 = '\xf'; 24char char_hex2 = '\xff'; 25/* expect+1: warning: overflow in hex escape [75] */ 26char char_hex3 = '\x100'; 27/* expect+1: warning: overflow in hex escape [75] */ 28char char_hex4 = '\xffff'; 29/* expect+1: warning: overflow in hex escape [75] */ 30char char_hex5 = '\xfffff'; 31/* expect+1: warning: overflow in hex escape [75] */ 32char char_hex9 = '\xfffffffff'; 33 34int wide_hex1 = L'\xf'; 35int wide_hex2 = L'\xff'; 36int wide_hex3 = L'\x100'; 37int wide_hex4 = L'\xffff'; 38int wide_hex5 = L'\xfffff'; 39/* expect+2: warning: overflow in hex escape [75] */ 40/* expect+1: error: empty character constant [73] */ 41int wide_hex9 = L'\xfffffffff'; 42 43char char_string_hex1[] = "\xf"; 44char char_string_hex2[] = "\xff"; 45/* expect+1: warning: overflow in hex escape [75] */ 46char char_string_hex3[] = "\x100"; 47/* expect+1: warning: overflow in hex escape [75] */ 48char char_string_hex4[] = "\xffff"; 49/* expect+1: warning: overflow in hex escape [75] */ 50char char_string_hex5[] = "\xfffff"; 51/* expect+1: warning: overflow in hex escape [75] */ 52char char_string_hex9[] = "\xfffffffff"; 53 54int wide_string_hex1[] = L"\xf"; 55int wide_string_hex2[] = L"\xff"; 56int wide_string_hex3[] = L"\x100"; 57int wide_string_hex4[] = L"\xffff"; 58int wide_string_hex5[] = L"\xfffff"; 59/* expect+1: warning: overflow in hex escape [75] */ 60int wide_string_hex9[] = L"\xfffffffff"; 61