+
+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
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
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");