msg_075.c revision 1.10
1/* $NetBSD: msg_075.c,v 1.10 2024/02/03 19:18:36 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_hex4bit = '\xf'; 24char char_hex7bit = '\x7f'; 25char char_hex8bit = '\xff'; 26/* expect+1: warning: overflow in hex escape [75] */ 27char char_hex9bit = '\x100'; 28/* expect+1: warning: overflow in hex escape [75] */ 29char char_hex16bit = '\xffff'; 30/* expect+1: warning: overflow in hex escape [75] */ 31char char_hex20bit = '\xfffff'; 32/* expect+1: warning: overflow in hex escape [75] */ 33char char_hex31bit = '\x7fffffff'; 34/* expect+1: warning: overflow in hex escape [75] */ 35char char_hex32bit = '\xffffffff'; 36/* expect+1: warning: overflow in hex escape [75] */ 37char char_hex33bit = '\x1000000ff'; 38/* expect+1: warning: overflow in hex escape [75] */ 39char char_hex36bit = '\xfffffffff'; 40 41int wide_hex4bit = L'\xf'; 42int wide_hex7bit = L'\x7f'; 43int wide_hex8bit = L'\xff'; 44int wide_hex9bit = L'\x100'; 45int wide_hex16bit = L'\xffff'; 46int wide_hex20bit = L'\xfffff'; 47int wide_hex31bit = L'\x7fffffff'; 48int wide_hex32bit = L'\xffffffff'; 49/* expect+1: warning: overflow in hex escape [75] */ 50int wide_hex33bit = L'\x1000000ff'; 51/* expect+1: warning: overflow in hex escape [75] */ 52int wide_hex36bit = L'\xfffffffff'; 53 54char char_string_hex4bit[] = "\xf"; 55char char_string_hex7bit[] = "\x7f"; 56char char_string_hex8bit[] = "\xff"; 57/* expect+1: warning: overflow in hex escape [75] */ 58char char_string_hex9bit[] = "\x100"; 59/* expect+1: warning: overflow in hex escape [75] */ 60char char_string_hex16bit[] = "\xffff"; 61/* expect+1: warning: overflow in hex escape [75] */ 62char char_string_hex20bit[] = "\xfffff"; 63/* expect+1: warning: overflow in hex escape [75] */ 64char char_string_hex31bit[] = "\x7fffffff"; 65/* expect+1: warning: overflow in hex escape [75] */ 66char char_string_hex32bit[] = "\xffffffff"; 67/* expect+1: warning: overflow in hex escape [75] */ 68char char_string_hex33bit[] = "\x1000000ff"; 69/* expect+1: warning: overflow in hex escape [75] */ 70char char_string_hex36[] = "\xfffffffff"; 71 72int wide_string_hex4bit[] = L"\xf"; 73int wide_string_hex7bit[] = L"\x7f"; 74int wide_string_hex8bit[] = L"\xff"; 75int wide_string_hex9bit[] = L"\x100"; 76int wide_string_hex16bit[] = L"\xffff"; 77int wide_string_hex20bit[] = L"\xfffff"; 78int wide_string_hex31bit[] = L"\x7fffffff"; 79int wide_string_hex32bit[] = L"\xffffffff"; 80/* expect+1: warning: overflow in hex escape [75] */ 81int wide_string_hex33bit[] = L"\x1000000ff"; 82/* expect+1: warning: overflow in hex escape [75] */ 83int wide_string_hex36bit[] = L"\xfffffffff"; 84