]> git.ozlabs.org Git - ccan/blob - ccan/tcon/test/compile_fail-wrap.c
tcon: Add tcon_sizeof() helper
[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(int argc, char *argv[])
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 }