]> git.ozlabs.org Git - ccan/blobdiff - ccan/bytestring/test/compile_fail-BYTESTRING-2.c
bytestring: new module.
[ccan] / ccan / bytestring / test / compile_fail-BYTESTRING-2.c
diff --git a/ccan/bytestring/test/compile_fail-BYTESTRING-2.c b/ccan/bytestring/test/compile_fail-BYTESTRING-2.c
new file mode 100644 (file)
index 0000000..7ab06f8
--- /dev/null
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+#include <ccan/bytestring/bytestring.h>
+
+int main(int argc, char *argv[])
+{
+       struct bytestring bs;
+       const char *x = "abcde";
+
+#ifdef FAIL
+       bs = BYTESTRING(x);
+#endif
+       printf("%zd %s\n", bs.len, x);
+       return 0;
+}