aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile@starynkevitch.net>2010-11-08 17:39:16 +0000
committerBasile Starynkevitch <bstarynk@gcc.gnu.org>2010-11-08 17:39:16 +0000
commit90aa3e91ad41ed9c05ce967a1ae6b7c98e89bb5f (patch)
tree837498abbd51ea01a67ea03fdf05081d93bb6b75
parent2876a10d42f43a5bb02d7b25bb2ad31c2f18850d (diff)
downloadgcc-90aa3e91ad41ed9c05ce967a1ae6b7c98e89bb5f.zip
gcc-90aa3e91ad41ed9c05ce967a1ae6b7c98e89bb5f.tar.gz
gcc-90aa3e91ad41ed9c05ce967a1ae6b7c98e89bb5f.tar.bz2
gengtype (get_output_file_for_structure): Ensure type is union or struct.
2010-11-08 Basile Starynkevitch <basile@starynkevitch.net> * gengtype (get_output_file_for_structure): Ensure type is union or struct. (write_splay_tree_allocator_def): Use get_output_file_with_visibility. From-SVN: r166442
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/gengtype.c7
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 31e365d..408a054 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+
+2010-11-08 Basile Starynkevitch <basile@starynkevitch.net>
+
+ * gengtype (get_output_file_for_structure): Ensure type is union
+ or struct.
+ (write_splay_tree_allocator_def): Use
+ get_output_file_with_visibility.
+
2010-11-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_handle_arch_option): Set type and flags
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 55f9a78..306e61e 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -2637,9 +2637,12 @@ output_type_enum (outf_p of, type_p s)
static outf_p
get_output_file_for_structure (const_type_p s, type_p *param)
{
- const char *fn = s->u.s.line.file;
+ const char *fn;
int i;
+ gcc_assert (UNION_OR_STRUCT_P (s));
+ fn = s->u.s.line.file;
+
/* This is a hack, and not the good kind either. */
for (i = NUM_PARAM - 1; i >= 0; i--)
if (param && param[i] && param[i]->kind == TYPE_POINTER
@@ -4062,7 +4065,7 @@ output_typename (outf_p of, const_type_p t)
static void
write_splay_tree_allocator_def (const_type_p s)
{
- outf_p of = get_output_file_for_structure (s, NULL);
+ outf_p of = get_output_file_with_visibility (NULL);
oprintf (of, "void * ggc_alloc_splay_tree_");
output_typename (of, s);
oprintf (of, " (int sz, void * nl)\n");