Index: ChangeLog
authorGeoffrey Keating <geoffk@apple.com>
Fri, 31 Jan 2003 01:42:38 +0000 (01:42 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 31 Jan 2003 01:42:38 +0000 (01:42 +0000)
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

gcc/ChangeLog
gcc/Makefile.in
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/t-rs6000
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/gengtype.c

index 62d24ddda74413486f9f46e03f57e3152db94b42..e7ff50b6a0dfc267c4fd3ca10f1c36abef995a56 100644 (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.
index 1e947e6892848a865add91039a517aac509474e8..8dae5fecdbf08edb24d4119270c1097846cd7338 100644 (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
index 2d9ac48109c4f367eb081167afa60e40931908a5..bf5cddd9f63581f3edac3d4a8bf2f47dd8b1f130 100644 (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)));
index c2a7848711b450ec547393a2efa38af26af6c24a..8806c2e62ed2c8fd28e5c9487f6c03fd4964d258 100644 (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 =
index 5e6a99bf14d75747be372b6ee72af8881019ede8..a9dd91e0376e05b606954571bde3efd280882bc1 100644 (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
index e143f24cde85a61aa0b21d1ef7f3d2f3abf734f8..347b71a906a85b6d9ac12465af8ba7a57ca0dc7e 100644 (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)
index 422214137ec2f1cfbf39edaf06f8c8e4b121a425..319553d972a14e343c5b9cbe90aca8b1e2a3f017 100644 (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;