msg_174.c revision 1.6
1/* $NetBSD: msg_174.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */ 2# 3 "msg_174.c" 3 4// Test for message: too many initializers [174] 5 6/* lint1-extra-flags: -X 351 */ 7 8void 9example(void) 10{ 11 /* A single pair of braces is always allowed. */ 12 int n = { 13 }; 13 14 /* expect+1: error: too many initializers [174] */ 15 int too_many = { 17, 19 }; 16 17 /* 18 * An initializer list must have at least one expression, says the 19 * syntax definition in C99 6.7.8. 20 */ 21 int too_few = {}; 22} 23