summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c
blob: 31628b4562887669cae9c406cdb9d97afea53551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* union cast */

struct bar {
	int a;
	int b;
};

union foo {
	struct bar *a;
	int b;
};

void
foo(void) {
	struct bar *a;

	((union foo)a).a;
}
OpenPOWER on IntegriCloud