11.3Srillig/*	$NetBSD: msg_359.c,v 1.3 2024/11/05 06:23:04 rillig Exp $	*/
21.1Srillig# 3 "msg_359.c"
31.1Srillig
41.1Srillig// Test for message: missing new-style '\177' or old-style number base [359]
51.1Srillig
61.1Srillig/*
71.1Srillig * The first or second character of the snprintb format specifies the number
81.3Srillig * base.  It must be an octal or hexadecimal escape sequence, as the characters
91.3Srillig * 2, 10 and 16 are not printable, and writing '\n' instead of '\x0a' would be
101.3Srillig * misleading.
111.1Srillig */
121.1Srillig
131.1Srillig/* lint1-extra-flags: -X 351 */
141.1Srillig
151.1Srilligtypedef typeof(sizeof(0)) size_t;
161.1Srilligtypedef unsigned long long uint64_t;
171.1Srillig
181.2Srilligint snprintb(char *, size_t, const char *, uint64_t);
191.1Srillig
201.1Srilligvoid
211.1Srilligold_style_number_base(void)
221.1Srillig{
231.1Srillig	char buf[64];
241.1Srillig
251.1Srillig	/* expect+1: warning: missing new-style '\177' or old-style number base [359] */
261.1Srillig	snprintb(buf, sizeof(buf), "", 0);
271.1Srillig	snprintb(buf, sizeof(buf), "\010", 0);
281.1Srillig	snprintb(buf, sizeof(buf), "" "\177\020" "", 0);
291.1Srillig}
30