]> git.ozlabs.org Git - ccan/blobdiff - ccan/cast/test/compile_fail-cast_const2.c
cast: new limited cast package inspired by Jan Engelhardt's libhx.
[ccan] / ccan / cast / test / compile_fail-cast_const2.c
diff --git a/ccan/cast/test/compile_fail-cast_const2.c b/ccan/cast/test/compile_fail-cast_const2.c
new file mode 100644 (file)
index 0000000..88df4b7
--- /dev/null
@@ -0,0 +1,17 @@
+#include <ccan/cast/cast.h>
+#include <stdlib.h>
+
+int main(int argc, char *argv[])
+{
+       char **uc;
+       const 
+#ifdef FAIL
+               int
+#else
+               char
+#endif
+               **p = NULL;
+
+       uc = cast_const2(char **, p);
+       return 0;
+}