From: Reini Urban Date: Sun, 6 Dec 2009 14:31:23 +0000 (+0000) Subject: Innocently looking union member swap X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a12fdfc8231e1ef9e624e5f6dac620de236e884;p=p5sagit%2Fp5-mst-13.2.git Innocently looking union member swap This helps statically initializing union members on gcc, otherwise we get "initializer element is not computable at load time". This speeds up initializing larger B::C/B::CC compiled programs with -O1/-O2 by 10%. --- diff --git a/sv.h b/sv.h index b452b36..fc1b475 100644 --- a/sv.h +++ b/sv.h @@ -103,10 +103,10 @@ typedef struct hek HEK; #define _SV_HEAD_UNION \ union { \ + char* svu_pv; /* pointer to malloced string */ \ IV svu_iv; \ UV svu_uv; \ SV* svu_rv; /* pointer to another SV */ \ - char* svu_pv; /* pointer to malloced string */ \ SV** svu_array; \ HE** svu_hash; \ GP* svu_gp; \