+2003-01-30 Geoffrey Keating <geoffk@apple.com>
+
+ * gengtype.c (struct walk_type_data): Add needs_cast_p.
+ (walk_type): Set needs_cast_p in walk_type_data.
+ (write_types_process_field): Supply casts when required to suppress
+ warnings.
+ (write_root): Cast gt_pch_n_S to suppress warning.
+ * Makefile.in: Remove -Wno-error from gtype-desc.o and c-decl.o.
+ * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
+ * config/rs6000/rs6000.c (print_operand): Mask off high bits only
+ when they might exist.
+ * config/rs6000/t-rs6000: Remove -Wno-error from varasm.o,
+ insn-conditions.o, and rs6000.o.
+
2003-01-30 Richard Henderson <rth@redhat.com>
* ggc-page.c (G.context_depth_allocations): New.
if (uval & 1) /* Clear Left */
{
- uval &= ((unsigned HOST_WIDE_INT) 1 << 63 << 1) - 1;
+#if HOST_BITS_PER_WIDE_INT > 64
+ uval &= ((unsigned HOST_WIDE_INT) 1 << 64) - 1;
+#endif
i = 64;
}
else /* Clear Right */
{
uval = ~uval;
- uval &= ((unsigned HOST_WIDE_INT) 1 << 63 << 1) - 1;
+#if HOST_BITS_PER_WIDE_INT > 64
+ uval &= ((unsigned HOST_WIDE_INT) 1 << 64) - 1;
+#endif
i = 63;
}
while (uval != 0)
&& flag_pic && current_function_uses_pic_offset_table)
{
rtx dest = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM);
- char *picbase = machopic_function_base_name ();
+ const char *picbase = machopic_function_base_name ();
rtx src = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (picbase, -1));
rs6000_maybe_dead (emit_insn (gen_load_macho_picbase (dest, src)));
int used_length;
type_p orig_s;
const char *reorder_fn;
+ int needs_cast_p;
};
/* Print a mangled name representing T to OF. */
int maybe_undef_p = 0;
int use_param_num = -1;
int use_params_p = 0;
- int needs_cast_p = 0;
options_p oo;
+ d->needs_cast_p = 0;
for (oo = d->opt; oo; oo = oo->next)
if (strcmp (oo->name, "length") == 0)
length = (const char *)oo->info;
nt = create_array (nt, t->u.a.len);
else if (length != NULL && t->kind == TYPE_POINTER)
nt = create_pointer (nt);
- needs_cast_p = (t->kind != TYPE_POINTER
- && nt->kind == TYPE_POINTER);
+ d->needs_cast_p = (t->kind != TYPE_POINTER
+ && (nt->kind == TYPE_POINTER
+ || nt->kind == TYPE_STRING));
t = nt;
}
else
const struct walk_type_data *d;
{
const struct write_types_data *wtd;
+ const char *cast = d->needs_cast_p ? "(void *)" : "";
wtd = (const struct write_types_data *) d->cookie;
switch (f->kind)
{
case TYPE_POINTER:
- oprintf (d->of, "%*s%s (%s", d->indent, "",
- wtd->subfield_marker_routine, d->val);
+ oprintf (d->of, "%*s%s (%s%s", d->indent, "",
+ wtd->subfield_marker_routine, cast, d->val);
if (wtd->param_prefix)
{
oprintf (d->of, ", %s", d->prev_val[3]);
}
oprintf (d->of, ");\n");
if (d->reorder_fn && wtd->reorder_note_routine)
- oprintf (d->of, "%*s%s (%s, %s, %s);\n", d->indent, "",
- wtd->reorder_note_routine, d->val,
+ oprintf (d->of, "%*s%s (%s%s, %s, %s);\n", d->indent, "",
+ wtd->reorder_note_routine, cast, d->val,
d->prev_val[3], d->reorder_fn);
break;
case TYPE_PARAM_STRUCT:
oprintf (d->of, "%*sgt_%s_", d->indent, "", wtd->prefix);
output_mangled_typename (d->of, f);
- oprintf (d->of, " (%s);\n", d->val);
+ oprintf (d->of, " (%s%s);\n", cast, d->val);
if (d->reorder_fn && wtd->reorder_note_routine)
- oprintf (d->of, "%*s%s (%s, %s, %s);\n", d->indent, "",
- wtd->reorder_note_routine, d->val, d->val,
+ oprintf (d->of, "%*s%s (%s%s, %s%s, %s);\n", d->indent, "",
+ wtd->reorder_note_routine, cast, d->val, cast, d->val,
d->reorder_fn);
break;
oprintf (f, " 1, \n");
oprintf (f, " sizeof (%s),\n", v->name);
oprintf (f, " >_ggc_m_S,\n");
- oprintf (f, " >_pch_n_S\n");
+ oprintf (f, " (gt_pointer_walker) >_pch_n_S\n");
oprintf (f, " },\n");
}
break;