]> git.ozlabs.org Git - ccan/blobdiff - ccan/cast/test/compile_fail-cast_const3.c
cast: new limited cast package inspired by Jan Engelhardt's libhx.
[ccan] / ccan / cast / test / compile_fail-cast_const3.c
diff --git a/ccan/cast/test/compile_fail-cast_const3.c b/ccan/cast/test/compile_fail-cast_const3.c
new file mode 100644 (file)
index 0000000..6232c86
--- /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_const3(char ***, p);
+       return 0;
+}