summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_320.c
blob: a856fd975da7ed15bcbf713dea809e708907d165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$NetBSD: msg_320.c,v 1.3 2022/06/17 06:59:16 rillig Exp $	*/
# 3 "msg_320.c"

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

/* lint1-flags: -Sw */

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