]> git.ozlabs.org Git - ccan/blobdiff - ccan/cast/test/compile_fail-cast_const-sizesame.c
cast: fix cast of void * when we don't have GCC features.
[ccan] / ccan / cast / test / compile_fail-cast_const-sizesame.c
diff --git a/ccan/cast/test/compile_fail-cast_const-sizesame.c b/ccan/cast/test/compile_fail-cast_const-sizesame.c
deleted file mode 100644 (file)
index d401cc8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <ccan/cast/cast.h>
-#include <stdlib.h>
-
-/* Note: this *isn't* sizeof(char) on all platforms. */
-struct char_struct {
-       char c;
-};
-
-int main(int argc, char *argv[])
-{
-       char *uc;
-       const
-#ifdef FAIL
-               struct char_struct
-#else
-               char
-#endif
-               *p = NULL;
-
-       uc = cast_const(char *, p);
-       return 0;
-}
-
-#ifdef FAIL
-#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
-#error "Unfortunately we don't fail if cast_const can only use size"
-#endif
-#endif