From: rguenth Date: Mon, 26 Jun 2006 18:18:22 +0000 (+0000) Subject: 2006-06-26 Richard Guenther X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=65c79db32af2be2c3a44e9b118cb868db71ddd5d;p=pf3gnuchains%2Fgcc-fork.git 2006-06-26 Richard Guenther * tree.c (build_string): Do not waste tail padding in struct tree_string. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115021 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea09b8d8303..ae7bf358c0e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2006-06-26 Richard Guenther + * tree.c (build_string): Do not waste tail padding in + struct tree_string. + +2006-06-26 Richard Guenther + * ggc-page.c (init_ggc): Add missing element to size_lookup table. diff --git a/gcc/tree.c b/gcc/tree.c index cbf4cc51eed..e0e6716c2f6 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1120,8 +1120,9 @@ build_string (int len, const char *str) { tree s; size_t length; - - length = len + sizeof (struct tree_string); + + /* Do not waste bytes provided by padding of struct tree_string. */ + length = len + offsetof (struct tree_string, str) + 1; #ifdef GATHER_STATISTICS tree_node_counts[(int) c_kind]++;