msg_075.c revision 1.9
11.9Srillig/* $NetBSD: msg_075.c,v 1.9 2024/02/03 18:58:05 rillig Exp $ */ 21.1Srillig# 3 "msg_075.c" 31.1Srillig 41.1Srillig// Test for message: overflow in hex escape [75] 51.1Srillig 61.6Srillig/* lint1-extra-flags: -X 351 */ 71.6Srillig 81.5Srillig/* 91.5Srillig * See also: 101.5Srillig * lex_char.c 111.5Srillig * lex_char_uchar.c 121.5Srillig * lex_string.c 131.5Srillig * lex_wide_char.c 141.5Srillig * lex_wide_string.c 151.5Srillig */ 161.5Srillig 171.4Srillig/* expect+1: warning: overflow in hex escape [75] */ 181.4Srilligchar str[] = "\x12345678123456781234567812345678"; 191.5Srillig 201.5Srillig/* C11 6.4.4.4p7 */ 211.5Srilligchar leading_zeroes = '\x0000000000000000000000000000020'; 221.7Srillig 231.7Srilligchar char_hex1 = '\xf'; 241.7Srilligchar char_hex2 = '\xff'; 251.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 261.7Srilligchar char_hex3 = '\x100'; 271.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 281.7Srilligchar char_hex4 = '\xffff'; 291.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 301.7Srilligchar char_hex5 = '\xfffff'; 311.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 321.7Srilligchar char_hex9 = '\xfffffffff'; 331.7Srillig 341.7Srilligint wide_hex1 = L'\xf'; 351.7Srilligint wide_hex2 = L'\xff'; 361.7Srilligint wide_hex3 = L'\x100'; 371.7Srilligint wide_hex4 = L'\xffff'; 381.7Srilligint wide_hex5 = L'\xfffff'; 391.9Srillig/* expect+1: warning: overflow in hex escape [75] */ 401.7Srilligint wide_hex9 = L'\xfffffffff'; 411.7Srillig 421.7Srilligchar char_string_hex1[] = "\xf"; 431.7Srilligchar char_string_hex2[] = "\xff"; 441.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 451.7Srilligchar char_string_hex3[] = "\x100"; 461.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 471.7Srilligchar char_string_hex4[] = "\xffff"; 481.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 491.7Srilligchar char_string_hex5[] = "\xfffff"; 501.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 511.7Srilligchar char_string_hex9[] = "\xfffffffff"; 521.7Srillig 531.7Srilligint wide_string_hex1[] = L"\xf"; 541.7Srilligint wide_string_hex2[] = L"\xff"; 551.7Srilligint wide_string_hex3[] = L"\x100"; 561.7Srilligint wide_string_hex4[] = L"\xffff"; 571.7Srilligint wide_string_hex5[] = L"\xfffff"; 581.7Srillig/* expect+1: warning: overflow in hex escape [75] */ 591.7Srilligint wide_string_hex9[] = L"\xfffffffff"; 60