msg_075.c revision 1.7
11.7Srillig/*	$NetBSD: msg_075.c,v 1.7 2024/02/02 19:07:58 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.7Srillig/* expect+1: warning: overflow in hex escape [75] */
371.7Srilligint wide_hex3 = L'\x100';
381.7Srillig/* expect+1: warning: overflow in hex escape [75] */
391.7Srilligint wide_hex4 = L'\xffff';
401.7Srillig/* expect+1: warning: overflow in hex escape [75] */
411.7Srilligint wide_hex5 = L'\xfffff';
421.7Srillig/* expect+1: warning: overflow in hex escape [75] */
431.7Srilligint wide_hex9 = L'\xfffffffff';
441.7Srillig
451.7Srilligchar char_string_hex1[] = "\xf";
461.7Srilligchar char_string_hex2[] = "\xff";
471.7Srillig/* expect+1: warning: overflow in hex escape [75] */
481.7Srilligchar char_string_hex3[] = "\x100";
491.7Srillig/* expect+1: warning: overflow in hex escape [75] */
501.7Srilligchar char_string_hex4[] = "\xffff";
511.7Srillig/* expect+1: warning: overflow in hex escape [75] */
521.7Srilligchar char_string_hex5[] = "\xfffff";
531.7Srillig/* expect+1: warning: overflow in hex escape [75] */
541.7Srilligchar char_string_hex9[] = "\xfffffffff";
551.7Srillig
561.7Srilligint wide_string_hex1[] = L"\xf";
571.7Srilligint wide_string_hex2[] = L"\xff";
581.7Srillig/* expect+1: warning: overflow in hex escape [75] */
591.7Srilligint wide_string_hex3[] = L"\x100";
601.7Srillig/* expect+1: warning: overflow in hex escape [75] */
611.7Srilligint wide_string_hex4[] = L"\xffff";
621.7Srillig/* expect+1: warning: overflow in hex escape [75] */
631.7Srilligint wide_string_hex5[] = L"\xfffff";
641.7Srillig/* expect+1: warning: overflow in hex escape [75] */
651.7Srilligint wide_string_hex9[] = L"\xfffffffff";
66