Index: ChangeLog

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.

Index: cp/ChangeLog
2003-01-30  Geoffrey Keating  <geoffk@apple.com>

	* cp/Make-lang.in: Remove -Wno-error from cp/decl.o.

From-SVN: r62170
This commit is contained in:
Geoffrey Keating 2003-01-31 01:42:38 +00:00 committed by Geoffrey Keating
parent 4f7e3dcf7e
commit f099d36039
7 changed files with 43 additions and 19 deletions

View File

@ -1,3 +1,17 @@
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.

View File

@ -112,9 +112,6 @@ VALGRIND_DRIVER_DEFINES = @valgrind_path_defines@
GCC_WARN_CFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $(WERROR) $($@-warn)
# These files are to have -Werror bypassed in stage2:
# These contain warnings from the PCH merge.
gtype-desc.o-warn = -Wno-error
c-decl.o-warn = -Wno-error
# These are very hard to completely clean due to target complexities.
varasm.o-warn = -Wno-error
gcc.o-warn = -Wno-error

View File

@ -7780,13 +7780,17 @@ print_operand (file, x, code)
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)
@ -10631,7 +10635,7 @@ rs6000_emit_prologue ()
&& 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)));

View File

@ -15,3 +15,7 @@ rs6000-c.o: $(srcdir)/config/rs6000/rs6000-c.c \
$(TM_P_H) c-pragma.h errors.h coretypes.h $(TM_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/rs6000/rs6000-c.c
# The rs6000 backend doesn't cause warnings in these files.
varasm.o-warn =
insn-conditions.o-warn =
$(out_object_file)-warn =

View File

@ -1,3 +1,7 @@
2003-01-30 Geoffrey Keating <geoffk@apple.com>
* cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
2003-01-30 Mark Mitchell <mark@codesourcery.com>
* class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY

View File

@ -90,8 +90,6 @@ CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
# Use loose warnings for this front end.
cp-warn =
# This contains warnings from the PCH merge.
cp/decl.o-warn = -Wno-error
cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
libcpp.a $(LIBDEPS)

View File

@ -1430,6 +1430,7 @@ struct walk_type_data
int used_length;
type_p orig_s;
const char *reorder_fn;
int needs_cast_p;
};
/* Print a mangled name representing T to OF. */
@ -1534,9 +1535,9 @@ walk_type (t, d)
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;
@ -1603,8 +1604,9 @@ walk_type (t, d)
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
@ -1890,13 +1892,14 @@ write_types_process_field (f, d)
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]);
@ -1910,8 +1913,8 @@ write_types_process_field (f, d)
}
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;
@ -1925,10 +1928,10 @@ write_types_process_field (f, d)
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;
@ -2654,7 +2657,7 @@ write_root (f, v, type, name, has_length, line, if_marked)
oprintf (f, " 1, \n");
oprintf (f, " sizeof (%s),\n", v->name);
oprintf (f, " &gt_ggc_m_S,\n");
oprintf (f, " &gt_pch_n_S\n");
oprintf (f, " (gt_pointer_walker) &gt_pch_n_S\n");
oprintf (f, " },\n");
}
break;