summaryrefslogtreecommitdiff
path: root/ccan/minmax/test/compile_fail-wrongsign.c
blob: 6aeaf1c75e4dd054291f6b7292d67bfb084dc99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <ccan/minmax/minmax.h>

static int function(void)
{
#ifdef FAIL
	return min(1, 1U);
#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
#error "Unfortunately we don't fail if the typechecks are noops."
#endif
#else
	return 0;
#endif
}

int main(int argc, char *argv[])
{
	function();
	return 0;
}