]> git.ozlabs.org Git - ccan/blobdiff - ccan/cast/test/compile_fail-cast_signed-const.c
cast: fix cast of void * when we don't have GCC features.
[ccan] / ccan / cast / test / compile_fail-cast_signed-const.c
index 4e67dc6264491b5e9e61ca15c874884f97b7cc24..791d9b84529aa4bad527ec18294ff079a1b547bd 100644 (file)
@@ -13,3 +13,9 @@ int main(int argc, char *argv[])
        uc = cast_signed(unsigned 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