msg_359.c revision 1.2
1/* $NetBSD: msg_359.c,v 1.2 2024/08/31 06:57:31 rillig Exp $ */ 2# 3 "msg_359.c" 3 4// Test for message: missing new-style '\177' or old-style number base [359] 5 6/* 7 * The first or second character of the snprintb format specifies the number 8 * base. It must be given in binary. 9 */ 10 11/* lint1-extra-flags: -X 351 */ 12 13typedef typeof(sizeof(0)) size_t; 14typedef unsigned long long uint64_t; 15 16int snprintb(char *, size_t, const char *, uint64_t); 17 18void 19old_style_number_base(void) 20{ 21 char buf[64]; 22 23 /* expect+1: warning: missing new-style '\177' or old-style number base [359] */ 24 snprintb(buf, sizeof(buf), "", 0); 25 snprintb(buf, sizeof(buf), "\010", 0); 26 snprintb(buf, sizeof(buf), "" "\177\020" "", 0); 27} 28