From: Nicholas Clark Date: Wed, 16 Nov 2005 23:40:55 +0000 (+0000) Subject: Oi gcc, No! sizeof(void) is an error. *Not* 1. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4d97442eccd75702fefc796c9d6c90f521a6f06;p=p5sagit%2Fp5-mst-13.2.git Oi gcc, No! sizeof(void) is an error. *Not* 1. Wanting sizeof(void) isn't even a compilation error with -ansi -pedantic. Just a warning. Lame! I'm going to send it back for a full refund. Hateful software. p4raw-id: //depot/perl@26143 --- diff --git a/sv.c b/sv.c index da75a98..f01695b 100644 --- a/sv.c +++ b/sv.c @@ -1265,16 +1265,16 @@ static int offset_by_svtype[] = { #define new_body_type(sv_type) \ - S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type) \ - + offset_by_svtype[sv_type] + (void *)((char *)S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type)\ + + offset_by_svtype[sv_type]) #define del_body_type(p, sv_type) \ del_body(p, &PL_body_roots[sv_type]) #define new_body_allocated(sv_type) \ - S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type) \ - + offset_by_svtype[sv_type] + (void *)((char *)S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type)\ + + offset_by_svtype[sv_type]) #define del_body_allocated(p, sv_type) \ del_body(p - offset_by_svtype[sv_type], &PL_body_roots[sv_type])