]> git.ozlabs.org Git - ccan/blobdiff - ccan/tlist/test/compile_fail-tlist_top.c
endian: add constant versions.
[ccan] / ccan / tlist / test / compile_fail-tlist_top.c
index d02c3add7a2e0a4fb780527e63e433a519510d38..21651400ef0d94bf7cf6d2f7c9a55fdd0399b2dc 100644 (file)
@@ -16,21 +16,16 @@ int main(int argc, char *argv[])
 {
        struct tlist_children children;
        struct child child = { "child" };
-       void *c;
+#ifdef FAIL
+       struct cousin *c;
+#else
+       struct child *c;
+#endif
 
        tlist_init(&children);
        tlist_add(&children, &child, list);
 
-       c = tlist_top(&children,
-#ifdef FAIL
-#if !HAVE_FLEXIBLE_ARRAY_MEMBER
-#error Need flexible array members to check type
-#endif
-                     struct cousin,
-#else
-                     struct child,
-#endif
-                     list);
+       c = tlist_top(&children, list);
        (void) c; /* Suppress unused-but-set-variable warning. */
        return 0;
 }