1 /* $NetBSD: msg_318.c,v 1.4 2023/07/07 19:45:22 rillig Exp $ */ 2 # 3 "msg_318.c" 3 4 // Test for message: variable array dimension is a C99/GCC extension [318] 5 6 /* lint1-flags: -Sw -X 351 */ 7 8 unsigned long 9 example(int n) 10 { 11 unsigned long arr[n]; 12 13 arr[n - 1] = '\0'; 14 arr[0] = sizeof(unsigned long[n]); 15 return arr[n - 1]; 16 } 17 18 /* expect+1: error: syntax error ':' [249] */ 19 TODO: "Add example code that triggers the above message." 20 TODO: "Add example code that almost triggers the above message." 21