]> gcc.gnu.org Git - gcc.git/commitdiff
tree.c (build_string): Do not waste tail padding in struct tree_string.
authorRichard Guenther <rguenther@suse.de>
Mon, 26 Jun 2006 18:18:22 +0000 (18:18 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 26 Jun 2006 18:18:22 +0000 (18:18 +0000)
2006-06-26  Richard Guenther  <rguenther@suse.de>

* tree.c (build_string): Do not waste tail padding in
struct tree_string.

From-SVN: r115021

gcc/ChangeLog
gcc/tree.c

index ea09b8d830389a72331d301bc0a2b8e1d51aa9b9..ae7bf358c0ecb34296f918b719b14d3de2082acf 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-26  Richard Guenther  <rguenther@suse.de>
+
+       * tree.c (build_string): Do not waste tail padding in
+       struct tree_string.
+
 2006-06-26  Richard Guenther  <rguenther@suse.de>
 
        * ggc-page.c (init_ggc): Add missing element to size_lookup
index cbf4cc51eed72770122a4f6b5421ec9e0635a6fa..e0e6716c2f6997d6bac6cf92b74f639949f9fe3f 100644 (file)
@@ -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]++;
This page took 0.093519 seconds and 5 git commands to generate.