summaryrefslogtreecommitdiff
path: root/lib/ccan/array_size/test/compile_fail.c
blob: 37d315f2198c59c083cdc81c3c1e057538a123bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <ccan/array_size/array_size.h>

int main(int argc, char *argv[8])
{
	char array[100];
#ifdef FAIL
	return ARRAY_SIZE(argv) + ARRAY_SIZE(array);
#if !HAVE_TYPEOF || !HAVE_BUILTIN_TYPES_COMPATIBLE_P
#error "Unfortunately we don't fail if _array_size_chk is a noop."
#endif
#else
	return ARRAY_SIZE(array);
#endif
}