tdb2: suppress failtest more than once on mmap.
[ccan] / ccan / typesafe_cb / test / compile_fail-cast_if_type-promotable.c
1 #include <ccan/typesafe_cb/typesafe_cb.h>
2 #include <stdbool.h>
3
4 static void _set_some_value(void *val)
5 {
6 }
7
8 #define set_some_value(expr)                                            \
9         _set_some_value(typesafe_cb_cast(void *, long, (expr)))
10
11 int main(int argc, char *argv[])
12 {
13 #ifdef FAIL
14         bool x = 0;
15 #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
16 #error "Unfortunately we don't fail if typesafe_cb_cast is a noop."
17 #endif
18 #else
19         long x = 0;
20 #endif
21         set_some_value(x);
22         return 0;
23 }