cast: fix cast of void * when we don't have GCC features.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 22 Mar 2011 01:23:17 +0000 (11:53 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 22 Mar 2011 01:23:17 +0000 (11:53 +1030)
commit4a084a9e956e6e5fec9f9ecb02ca56a79de4a422
tree2680d93516179a7eff9d2a8ff2953d8ff92c8782
parentef54ea44cc261a59bf2d4b5f9898c89da409859d
cast: fix cast of void * when we don't have GCC features.

I thought using sizeof() comparison to compare the types was clever,
but it doesn't work on void pointers, as sizeof(void) is illegal.
ccan/cast/cast.h
ccan/cast/test/compile_fail-cast_const-sizesame.c [deleted file]
ccan/cast/test/compile_fail-cast_const.c
ccan/cast/test/compile_fail-cast_const2-sizesame.c [deleted file]
ccan/cast/test/compile_fail-cast_const2.c
ccan/cast/test/compile_fail-cast_const3-sizesame.c [deleted file]
ccan/cast/test/compile_fail-cast_const3.c
ccan/cast/test/compile_fail-cast_signed-const.c
ccan/cast/test/compile_ok-cast_void.c [new file with mode: 0644]