summaryrefslogtreecommitdiff
path: root/ccan/order/test/compile_fail_1.c
blob: ba63ca1ef605fd315f81948b6c5cdf7e95c18a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#include <ccan/order/order.h>

#include "fancy_cmp.h"

#ifdef FAIL
typedef int item_t;
#else
typedef struct item item_t;
#endif

int main(int argc, char *argv[])
{
	total_order_cb(cb0, struct item, struct cmp_info *) = fancy_cmp;
	_total_order_cb cb1 = total_order_cast(fancy_cmp,
					       item_t, struct cmp_info *);

	printf("%p %p\n", cb0, cb1);

	exit(0);
}