msg_359.c revision 1.2
11.2Srillig/*	$NetBSD: msg_359.c,v 1.2 2024/08/31 06:57:31 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.1Srillig * base.  It must be given in binary.
91.1Srillig */
101.1Srillig
111.1Srillig/* lint1-extra-flags: -X 351 */
121.1Srillig
131.1Srilligtypedef typeof(sizeof(0)) size_t;
141.1Srilligtypedef unsigned long long uint64_t;
151.1Srillig
161.2Srilligint snprintb(char *, size_t, const char *, uint64_t);
171.1Srillig
181.1Srilligvoid
191.1Srilligold_style_number_base(void)
201.1Srillig{
211.1Srillig	char buf[64];
221.1Srillig
231.1Srillig	/* expect+1: warning: missing new-style '\177' or old-style number base [359] */
241.1Srillig	snprintb(buf, sizeof(buf), "", 0);
251.1Srillig	snprintb(buf, sizeof(buf), "\010", 0);
261.1Srillig	snprintb(buf, sizeof(buf), "" "\177\020" "", 0);
271.1Srillig}
28