Merge Makefile rewrite into master
[ccan] / ccan / tcon / test / compile_fail-wrap.c
1 #include <ccan/tcon/tcon.h>
2 #include <stdlib.h>
3
4 struct container {
5         void *p;
6 };
7
8 int main(void)
9 {
10         TCON_WRAP(struct container, int *canary) icon;
11 #ifdef FAIL
12         char *
13 #else
14         int *
15 #endif
16                 x = NULL;
17
18         tcon_unwrap(tcon_check(&icon, canary, x))->p = x;
19         return 0;
20 }