]> git.ozlabs.org Git - ccan/commitdiff
typesafe_cb: don't use HAVE_CAST_TO_UNION in tests.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 10 May 2011 04:38:59 +0000 (14:08 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 10 May 2011 04:38:59 +0000 (14:08 +0930)
This crept in, it should be the same as the tests in typesafe_cb.h.

ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast-multi.c
ccan/typesafe_cb/test/compile_fail-typesafe_cb_cast.c

index d7d481cb60e42af5b816624012147947d511d519..62b5f91e1807cdaaebff2a0a0f95bd554388add5 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
 #ifdef FAIL
        struct other
-#if !HAVE_TYPEOF || !HAVE_CAST_TO_UNION
+#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
 #error "Unfortunately we don't fail if typesafe_cb_cast is a noop."
 #endif
 #else
index 07a204f6346bf59829a08445447175981899540b..d2e6f2ab40a2544f4147ad8cb3f8570d6b644dac 100644 (file)
@@ -14,7 +14,7 @@ int main(int argc, char *argv[])
 #ifdef FAIL
        int x = 0;
        set_some_value(x);
-#if !HAVE_TYPEOF||!HAVE_CAST_TO_UNION
+#if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
 #error "Unfortunately we don't fail if typesafe_cb_cast is a noop."
 #endif
 #else