]> git.ozlabs.org Git - ccan/blobdiff - typesafe_cb/test/compile_fail-cast_if_type.c
Compile even with !HAVE_TYPEOF etc, and remove redundant test case.
[ccan] / typesafe_cb / test / compile_fail-cast_if_type.c
index 2ab3fa2398f29fa6940f4952471467195202e08b..1e417cbac6bb869b43693087fe827380389d1cf8 100644 (file)
@@ -14,6 +14,9 @@ int main(int argc, char *argv[])
 #ifdef FAIL
        int x = 0;
        set_some_value(x);
+#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
+#error "Unfortunately we don't fail if cast_if_type is a noop."
+#endif
 #else
        void *p = 0;
        set_some_value(p);