From patchwork Tue Jul 24 10:36:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: : Bad gcc/gtype-desc.h generated when using sparse checkout Date: Tue, 24 Jul 2012 00:36:57 -0000 From: Uros Bizjak X-Patchwork-Id: 172819 Message-Id: To: gcc-patches@gcc.gnu.org Cc: Laurynas Biveinis , Steven Bosscher Hello! Attached patch implements suggested solution [1] from thread, starting at [2]. Patch works OK in my tree without ada directory. gcc/lto/ChangeLog: 2012-07-24 Uros Bizjak * lto-tree.h (lang_decl): Add variable_size GTY option. gcc/go/ChangeLog: 2012-07-24 Uros Bizjak * go-lang.c (lang_decl): Add variable_size GTY option. gcc/c/ChangeLog: 2012-07-24 Uros Bizjak * c-lang.h (lang_decl): Add variable_size GTY option. Tested on alphaev68-unknown-linux-gnu with all default languages + go + obj-c++. OK for mainline? [1] http://gcc.gnu.org/ml/gcc/2012-07/msg00057.html [2] http://gcc.gnu.org/ml/gcc/2012-07/msg00054.html Uros. Index: gcc/lto/lto-tree.h =================================================================== --- gcc/lto/lto-tree.h (revision 189801) +++ gcc/lto/lto-tree.h (working copy) @@ -28,7 +28,7 @@ struct tree_identifier base; }; -struct GTY(()) lang_decl +struct GTY((variable_size)) lang_decl { int dummy; /* Added because ggc does not like empty structs. */ }; Index: gcc/go/go-lang.c =================================================================== --- gcc/go/go-lang.c (revision 189801) +++ gcc/go/go-lang.c (working copy) @@ -50,7 +50,7 @@ /* Language-dependent contents of a decl. */ -struct GTY(()) lang_decl +struct GTY((variable_size)) lang_decl { char dummy; }; Index: gcc/c/c-lang.h =================================================================== --- gcc/c/c-lang.h (revision 189801) +++ gcc/c/c-lang.h (working copy) @@ -36,7 +36,7 @@ tree objc_info; }; -struct GTY(()) lang_decl { +struct GTY((variable_size)) lang_decl { char dummy; };