summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_024.c
blob: 27ff917dd977dbf6e09fec29de59dd4d0f3d9462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*	$NetBSD: msg_024.c,v 1.5 2023/03/28 14:44:34 rillig Exp $	*/
# 3 "msg_024.c"

// Test for message: cannot initialize function '%s' [24]

/* lint1-extra-flags: -X 351 */

typedef void (function)(void);

void
definition(void)
{
}

/* expect+3: error: cannot initialize function 'fn' [24] */
/* The following message is strange but does not occur in practice. */
/* expect+1: error: {}-enclosed initializer required [181] */
function fn = definition;