summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_320.c
blob: 9f684f7dfbc4e1c0b5448d693e1e5cf08a511f37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$NetBSD: msg_320.c,v 1.4 2023/07/07 19:45:22 rillig Exp $	*/
# 3 "msg_320.c"

// Test for message: ({ }) is a GCC extension [320]

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

int
example(void)
{
	return ({
		int base = 10;
		int square = base * base;
		square * base;
	});
	/* expect-1: warning: ({ }) is a GCC extension [320] */
}