summaryrefslogtreecommitdiff
path: root/lib/ccan/cast/test/compile_fail-cast_static.c
blob: 0f9e4780470a267dbf4573b76bd4791ba58f70b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <ccan/cast/cast.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
	char c;
#ifdef FAIL
	char *
#else
	long
#endif
		x = 0;

	c = cast_static(char, x);
	(void) c; /* Suppress unused-but-set-variable warning. */
	return 0;
}