xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_024.c (revision 53b02e147d4ed531c0d2a5ca9b3e8026ba3e99b5)
1 /*	$NetBSD: msg_024.c,v 1.3 2021/08/27 20:16:50 rillig Exp $	*/
2 # 3 "msg_024.c"
3 
4 // Test for message: cannot initialize function: %s [24]
5 
6 typedef void (function)(void);
7 
8 void
9 definition(void)
10 {
11 }
12 
13 /* expect+3: error: cannot initialize function: fn [24] */
14 /* The following message is strange but does not occur in practice. */
15 /* expect+1: error: {}-enclosed initializer required [181] */
16 function fn = definition;
17