]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
revert error reporting patch
authorJason Merrill <jason@gcc.gnu.org>
Mon, 7 Sep 1998 14:25:35 +0000 (10:25 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 7 Sep 1998 14:25:35 +0000 (10:25 -0400)
From-SVN: r22310

29 files changed:
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/Makefile.in
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/errfn.c
gcc/cp/except.c
gcc/cp/expr.c
gcc/cp/friend.c
gcc/cp/init.c
gcc/cp/lang-options.h
gcc/cp/lex.c
gcc/cp/method.c
gcc/cp/parse.c
gcc/cp/parse.y
gcc/cp/pt.c
gcc/cp/repo.c
gcc/cp/rtti.c
gcc/cp/search.c
gcc/cp/semantics.c
gcc/cp/sig.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/cp/xref.c

index 8a005991b4d04903dc1f5b073328ab09f80bc2cc..7315d2549c922d7cca9cfb906bd28b5748916a51 100644 (file)
@@ -1,63 +1,3 @@
-1998-09-07  Mark Mitchell  <mark@markmitchell.com>
-           and Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-       
-       * cp-tree.h (cp_error): Prototype.
-       (cp_error_at): Likewise.
-       (cp_warning): Likewise.
-       (cp_warning_at): Likewise.
-       (cp_pedwarn): Likewise.
-       (cp_pedwarn_at): Likewise.
-       (cp_compiler_error): Likewise.
-       (cp_sprintf): Likewise.
-       (cp_enable_warning): Likewise.
-       * errfn.c: Remove hack to avoid error-function prototypes when
-       including cp-tree.h.
-       
-1998-09-06  Mark Mitchell  <mark@markmitchell.com>
-
-       * cp-error.def: New file.
-       * Make-lang.in (cc1plus): Add dependency on it.
-       * Makefile.in (CXX_TREE_H): Likewise.
-       * cp-tree.h (error_code): New type.
-       Include cp-error.def to get error codes.  Make it possible to
-       include cp-tree.h in errfn.c.
-       (enable_warning): New function.
-       (flag_diag_codes): New variable.
-       * errfn.c: Include cp-tree.h.
-       (cp_err_msg): New type.  Include cp-error.def to define it.
-       (err_msgs): New variable.
-       (is_warning_enabled): New function.
-       (cp_thing): Take an error_code, not a format string.  Output the
-       diagnostic code if flag_diag_codes.
-       (cp_error, cp_compiler_error, cp_sprintf, cp_error_at): Take
-       error_codes, not format strings.
-       (cp_warning, cp_pedwarn, cp_warning_at, cp_pedwarn_at): Likewise.
-       Call is_warning_enabled.
-       * decl2.c (flag_diag_codes): New variable.
-       (lang_decode_option): Handle -fdiag-codes and -Wnumber.
-       * lang-options.h: Add -fdiag-codes, -fno-diag-codes, and
-       -W-number-, and -Wno-number.
-       
-       * class.c: Update all calls to error-functions.
-       * cvt.c: Likewise.
-       * decl.c: Likewise.
-       * decl2.c: Likewise.
-       * except.c: Likewise.
-       * expr.c: Likewise.
-       * friend.c: Likewise.
-       * lex.c: Likewise.
-       * parse.y: Likewise.
-       * pt.c: Likewise.
-       * repo.c: Likewise.
-       * rtti.c: Likewise.
-       * search.c: Likewise.
-       * semantics.c: Likewise.
-       * sig.c: Likewise.
-       * tree.c: Likewise.
-       * typeck.c: Likewise.
-       * typeck2.c: Likewise.
-       * xref.c: Likewise.
-       
 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
 
        * Makefile.in (INCLUDES): Update after recent toplevel gcc
index 3cf313c80636007096b10fe8d3e892fa70c25ed3..2bea6a675a9977a052a3b4177affb0f05b0a3781 100644 (file)
@@ -125,7 +125,7 @@ CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \
  $(srcdir)/cp/repo.c $(srcdir)/cp/semantics.c
 
 cc1plus$(exeext): $(P) $(CXX_SRCS) $(LIBDEPS) stamp-objlist c-common.o c-pragma.o \
-       $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def $(srcdir)/cp/cp-error.def
+       $(srcdir)/cp/cp-tree.h $(srcdir)/cp/cp-tree.def
        cd cp; $(MAKE) $(FLAGS_TO_PASS) $(CXX_FLAGS_TO_PASS) ../cc1plus$(exeext)
 #\f
 # Build hooks:
index cdc09848fbce93a0c3a21d695868f6da917e7fdc..f7e09414cb75904794526f884f59b8248bb25016 100644 (file)
@@ -208,7 +208,7 @@ RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
        $(srcdir)/../machmode.h $(srcdir)/../machmode.def
 TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \
        $(srcdir)/../machmode.h $(srcdir)/../machmode.def
-CXX_TREE_H = $(TREE_H) cp-tree.h cp-tree.def cp-error.def
+CXX_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
 PARSE_H = $(srcdir)/parse.h
 PARSE_C = $(srcdir)/parse.c
 EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
index e7cf716a023a9a14b44ead87dbe59feeae0976e7..d27d61614542ac404489e7ca54a8f425a950e21d 100644 (file)
@@ -132,7 +132,7 @@ build_field_call (basetype_path, instance_ptr, name, parms)
 
       if (field == NULL_TREE)
        {
-         cp_error (ec_this_has_no_member_named, name);
+         cp_error ("`this' has no member named `%D'", name);
          return error_mark_node;
        }
 
@@ -203,7 +203,7 @@ build_field_call (basetype_path, instance_ptr, name, parms)
        }
       else if (TREE_CODE (ftype) == METHOD_TYPE)
        {
-         cp_error (ec_invalid_call_via_pointertomember_function);
+         error ("invalid call via pointer-to-member function");
          return error_mark_node;
        }
       else
@@ -421,7 +421,7 @@ build_scoped_method_call (exp, basetype, name, parms)
        return build_method_call (exp, name, parms, NULL_TREE, LOOKUP_NORMAL);
 
       if (! check_dtor_name (basetype, name))
-       cp_error (ec_qualified_type_does_not_match_destructor_name,
+       cp_error ("qualified type `%T' does not match destructor name `~%T'",
                  basetype, TREE_OPERAND (name, 0));
 
       /* Destructors can be "called" for simple types; see 5.2.4 and 12.4 Note
@@ -430,7 +430,7 @@ build_scoped_method_call (exp, basetype, name, parms)
       if (! IS_AGGR_TYPE (basetype))
        {
          if (TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (basetype))
-           cp_error (ec_type_of_does_not_match_destructor_type_type_was,
+           cp_error ("type of `%E' does not match destructor type `%T' (type was `%T')",
                      exp, basetype, type);
 
          return cp_convert (void_type_node, exp);
@@ -442,7 +442,7 @@ build_scoped_method_call (exp, basetype, name, parms)
 
   if (! IS_AGGR_TYPE (type))
     {
-      cp_error (ec_base_object_of_scoped_method_call_is_of_nonaggregate_type,
+      cp_error ("base object `%E' of scoped method call is of non-aggregate type `%T'",
                exp, type);
       return error_mark_node;
     }
@@ -661,14 +661,15 @@ build_method_call (instance, name, parms, basetype_path, flags)
   if (TREE_CODE (name) == BIT_NOT_EXPR)
     {
       if (parms)
-       cp_error (ec_destructors_take_no_parameters);
+       error ("destructors take no parameters");
       basetype = TREE_TYPE (instance);
       if (TREE_CODE (basetype) == REFERENCE_TYPE)
        basetype = TREE_TYPE (basetype);
 
       if (! check_dtor_name (basetype, name))
-       cp_error (ec_destructor_name_does_not_match_type,
-                 TREE_OPERAND (name, 0), basetype);
+       cp_error
+         ("destructor name `~%T' does not match type `%T' of expression",
+          TREE_OPERAND (name, 0), basetype);
 
       if (! TYPE_HAS_DESTRUCTOR (complete_type (basetype)))
        return cp_convert (void_type_node, instance);
@@ -2018,20 +2019,20 @@ print_z_candidates (candidates)
       if (TREE_CODE (candidates->fn) == IDENTIFIER_NODE)
        {
          if (candidates->fn == ansi_opname [COND_EXPR])
-           cp_error (ec_builtin_3, str, candidates->fn,
+           cp_error ("%s %D(%T, %T, %T) <builtin>", str, candidates->fn,
                      TREE_TYPE (TREE_VEC_ELT (candidates->convs, 0)),
                      TREE_TYPE (TREE_VEC_ELT (candidates->convs, 1)),
                      TREE_TYPE (TREE_VEC_ELT (candidates->convs, 2)));
          else if (TREE_VEC_LENGTH (candidates->convs) == 2)
-           cp_error (ec_builtin_2, str, candidates->fn,
+           cp_error ("%s %D(%T, %T) <builtin>", str, candidates->fn,
                      TREE_TYPE (TREE_VEC_ELT (candidates->convs, 0)),
                      TREE_TYPE (TREE_VEC_ELT (candidates->convs, 1)));
          else
-           cp_error (ec_builtin_1, str, candidates->fn,
+           cp_error ("%s %D(%T) <builtin>", str, candidates->fn,
                      TREE_TYPE (TREE_VEC_ELT (candidates->convs, 0)));
        }
       else
-       cp_error_at (ec_candidate_1, str, candidates->fn,
+       cp_error_at ("%s %+D%s", str, candidates->fn,
                     candidates->viable == -1 ? " <near match>" : "");
       str = "               "; 
     }
@@ -2168,7 +2169,7 @@ build_user_type_conversion_1 (totype, expr, flags)
          if (candidates && ! candidates->next)
            /* say why this one won't work or try to be loose */;
          else
-           cp_error (ec_no_viable_candidates);
+           cp_error ("no viable candidates");
        }
 #endif
 
@@ -2182,7 +2183,7 @@ build_user_type_conversion_1 (totype, expr, flags)
     {
       if (flags & LOOKUP_COMPLAIN)
        {
-         cp_error (ec_conversion_from_to_is_ambiguous,
+         cp_error ("conversion from `%T' to `%T' is ambiguous",
                    fromtype, totype);
          print_z_candidates (candidates);
        }
@@ -2248,7 +2249,7 @@ resolve_args (args)
        return error_mark_node;
       else if (TREE_CODE (TREE_TYPE (TREE_VALUE (t))) == VOID_TYPE)
        {
-         cp_error (ec_invalid_use_of_void_expression);
+         error ("invalid use of void expression");
          return error_mark_node;
        }
       else if (TREE_CODE (TREE_VALUE (t)) == OFFSET_REF)
@@ -2301,7 +2302,7 @@ build_new_function_call (fn, args)
        {
          if (candidates && ! candidates->next)
            return build_function_call (candidates->fn, args);
-         cp_error (ec_no_matching_function_for_call_to,
+         cp_error ("no matching function for call to `%D (%A)'",
                    DECL_NAME (OVL_FUNCTION (fn)), args);
          if (candidates)
            print_z_candidates (candidates);
@@ -2312,7 +2313,7 @@ build_new_function_call (fn, args)
 
       if (cand == 0)
        {
-         cp_error (ec_call_of_overloaded_is_ambiguous,
+         cp_error ("call of overloaded `%D (%A)' is ambiguous",
                    DECL_NAME (OVL_FUNCTION (fn)), args);
          print_z_candidates (candidates);
          return error_mark_node;
@@ -2347,8 +2348,8 @@ build_object_call (obj, args)
     {
       /* It's no good looking for an overloaded operator() on a
         pointer-to-member-function.  */
-      cp_error (ec_pointertomember_function_cannot_be_called, obj);
-      cp_error (ec_without_an_object_consider_using_or);
+      cp_error ("pointer-to-member function %E cannot be called", obj);
+      cp_error ("without an object; consider using .* or ->*");
       return error_mark_node;
     }
 
@@ -2418,7 +2419,7 @@ build_object_call (obj, args)
 
   if (! any_viable (candidates))
     {
-      cp_error (ec_no_match_for_call_to, TREE_TYPE (obj), args);
+      cp_error ("no match for call to `(%T) (%A)'", TREE_TYPE (obj), args);
       print_z_candidates (candidates);
       return error_mark_node;
     }
@@ -2428,7 +2429,7 @@ build_object_call (obj, args)
 
   if (cand == 0)
     {
-      cp_error (ec_call_of_is_ambiguous, TREE_TYPE (obj), args);
+      cp_error ("call of `(%T) (%A)' is ambiguous", TREE_TYPE (obj), args);
       print_z_candidates (candidates);
       return error_mark_node;
     }
@@ -2454,23 +2455,23 @@ op_error (code, code2, arg1, arg2, arg3, problem)
   switch (code)
     {
     case COND_EXPR:
-      cp_error (ec_for_1, problem,
+      cp_error ("%s for `%T ? %T : %T'", problem,
                error_type (arg1), error_type (arg2), error_type (arg3));
       break;
     case POSTINCREMENT_EXPR:
     case POSTDECREMENT_EXPR:
-      cp_error (ec_for_2, problem, error_type (arg1), opname);
+      cp_error ("%s for `%T%s'", problem, error_type (arg1), opname);
       break;
     case ARRAY_REF:
-      cp_error (ec_for_3, problem,
+      cp_error ("%s for `%T[%T]'", problem,
                error_type (arg1), error_type (arg2));
       break;
     default:
       if (arg2)
-       cp_error (ec_for_4, problem,
+       cp_error ("%s for `%T %s %T'", problem,
                  error_type (arg1), opname, error_type (arg2));
       else
-       cp_error (ec_for_5, problem, opname, error_type (arg1));
+       cp_error ("%s for `%s%T'", problem, opname, error_type (arg1));
     }
 }
 
@@ -2495,7 +2496,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
      undeclared_template<1, 5, 72>a;  */
   if (code == LT_EXPR && TREE_CODE (arg1) == TEMPLATE_DECL)
     {
-      cp_error (ec_must_be_declared_before_use, arg1);
+      cp_error ("`%D' must be declared before use", arg1);
       return error_mark_node;
     }
 
@@ -2712,7 +2713,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
          /* Look for an `operator++ (int)'.  If they didn't have
             one, then we fall back to the old way of doing things.  */
          if (flags & LOOKUP_COMPLAIN)
-           cp_pedwarn (ec_no_int_declared_for_postfix_s_trying_prefix_operator_instead,
+           cp_pedwarn ("no `%D (int)' declared for postfix `%s', trying prefix operator instead",
                        fnname, opname_tab [code]);
          if (code == POSTINCREMENT_EXPR)
            code = PREINCREMENT_EXPR;
@@ -2758,9 +2759,9 @@ build_new_op (code, flags, arg1, arg2, arg3)
          && candidates->next
          && ! candidates->next->next)
        {
-         cp_warning (ec_using_synthesized_for_copy_assignment,
+         cp_warning ("using synthesized `%#D' for copy assignment",
                      cand->fn);
-         cp_warning_at (ec_where_cfront_would_use,
+         cp_warning_at ("  where cfront would use `%#D'",
                         cand == candidates
                         ? candidates->next->fn
                         : candidates->fn);
@@ -2795,7 +2796,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
          && (TYPE_MAIN_VARIANT (TREE_TYPE (arg1))
              != TYPE_MAIN_VARIANT (TREE_TYPE (arg2))))
        {
-         cp_warning (ec_comparison_between_and
+         cp_warning ("comparison between `%#T' and `%#T'"
                      TREE_TYPE (arg1), TREE_TYPE (arg2));
        }
       break;
@@ -3022,7 +3023,7 @@ build_op_delete_call (code, addr, size, flags, placement)
   if (flags & LOOKUP_SPECULATIVELY)
     return NULL_TREE;
 
-  cp_error (ec_no_suitable_operator_delete_for, type);
+  cp_error ("no suitable operator delete for `%T'", type);
   return error_mark_node;
 }
 
@@ -3037,17 +3038,17 @@ enforce_access (basetype_path, decl)
 
   if (access == access_private_node)
     {
-      cp_error_at (ec_access_is_1, decl, 
+      cp_error_at ("`%+#D' is %s", decl, 
                   TREE_PRIVATE (decl) ? "private"
                   : "from private base class");
-      cp_error (ec_within_this_context);
+      error ("within this context");
     }
   else if (access == access_protected_node)
     {
-      cp_error_at (ec_access_is_2, decl,
+      cp_error_at ("`%+#D' %s", decl,
                   TREE_PROTECTED (decl) ? "is protected"
                   : "has protected accessibility");
-      cp_error (ec_within_this_context);
+      error ("within this context");
     }
 }
 
@@ -3150,11 +3151,11 @@ convert_like (convs, expr)
                if (comptypes (TREE_TYPE (expr), TREE_TYPE (convs), 1))
                  incomplete_type_error (expr, TREE_TYPE (expr));
                else
-                 cp_error (ec_could_not_convert_with_incomplete_type_to,
+                 cp_error ("could not convert `%E' (with incomplete type `%T') to `%T'",
                            expr, TREE_TYPE (expr), TREE_TYPE (convs));
              }
            else
-             cp_error (ec_could_not_convert_to,
+             cp_error ("could not convert `%E' to `%T'",
                        expr, TREE_TYPE (convs));
            return error_mark_node;
          }
@@ -3195,7 +3196,7 @@ convert_arg_to_ellipsis (arg)
     arg = cp_convert (double_type_node, arg);
   else if (IS_AGGR_TYPE (TREE_TYPE (arg))
           && ! TYPE_HAS_TRIVIAL_INIT_REF (TREE_TYPE (arg)))
-    cp_warning (ec_cannot_pass_objects_of_type_through,
+    cp_warning ("cannot pass objects of type `%T' through `...'",
                TREE_TYPE (arg));
   else
     /* Convert `short' and `char' to full-size `int'.  */
@@ -3295,7 +3296,7 @@ build_over_call (cand, args, flags)
          char *p = (dv && dc ? "const and volatile"
                              : dc ? "const" : dv ? "volatile" : "");
 
-         cp_pedwarn (ec_passing_as_this_argument_of_discards_s,
+         cp_pedwarn ("passing `%T' as `this' argument of `%#D' discards %s",
                      TREE_TYPE (argtype), fn, p);
        }
       /* [class.mfct.nonstatic]: If a nonstatic member function of a class
@@ -3347,7 +3348,7 @@ build_over_call (cand, args, flags)
          /* Issue warnings about peculiar, but legal, uses of NULL.  */
          if (ARITHMETIC_TYPE_P (TREE_VALUE (parm))
              && TREE_VALUE (arg) == null_node)
-           cp_warning (ec_converting_null_to_nonpointer_type);
+           cp_warning ("converting NULL to non-pointer type");
            
          val = convert_like (conv, TREE_VALUE (arg));
        }
@@ -3597,7 +3598,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
                    || IS_SIGNATURE_REFERENCE (basetype))))
        {
          if ((flags & LOOKUP_COMPLAIN) && basetype != error_mark_node)
-           cp_error (ec_request_for_member_in_which_is_of_nonaggregate_type,
+           cp_error ("request for member `%D' in `%E', which is of non-aggregate type `%T'",
                      name, instance, basetype);
 
          return error_mark_node;
@@ -3688,7 +3689,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
       /* XXX will LOOKUP_SPECULATIVELY be needed when this is done?  */
       if (flags & LOOKUP_SPECULATIVELY)
        return NULL_TREE;
-      cp_error (ec_no_matching_function_for_call_to_member, basetype,
+      cp_error ("no matching function for call to `%T::%D (%A)%V'", basetype,
                pretty_name, user_args, TREE_TYPE (TREE_TYPE (instance_ptr)));
       print_z_candidates (candidates);
       return error_mark_node;
@@ -3698,7 +3699,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
 
   if (cand == 0)
     {
-      cp_error (ec_call_of_overloaded_is_ambiguous_2, pretty_name,
+      cp_error ("call of overloaded `%D(%A)' is ambiguous", pretty_name,
                user_args);
       print_z_candidates (candidates);
       return error_mark_node;
@@ -3709,11 +3710,11 @@ build_new_method_call (instance, name, args, basetype_path, flags)
       && DECL_CONSTRUCTOR_P (current_function_decl)
       && ! (flags & LOOKUP_NONVIRTUAL)
       && value_member (cand->fn, get_abstract_virtuals (basetype)))
-    cp_error (ec_abstract_virtual_called_from_constructor, cand->fn);
+    cp_error ("abstract virtual `%#D' called from constructor", cand->fn);
   if (TREE_CODE (TREE_TYPE (cand->fn)) == METHOD_TYPE
       && TREE_CODE (instance_ptr) == NOP_EXPR
       && TREE_OPERAND (instance_ptr, 0) == error_mark_node)
-    cp_error (ec_cannot_call_member_function_without_object, cand->fn);
+    cp_error ("cannot call member function `%D' without object", cand->fn);
 
   if (DECL_VINDEX (cand->fn) && ! (flags & LOOKUP_NONVIRTUAL)
       && ((instance == current_class_ref && (dtor_label || ctor_label))
@@ -4326,9 +4327,9 @@ joust (cand1, cand2, warn)
 
              if (warn)
                {
-                 cp_warning (ec_passing_chooses_over,
+                 cp_warning ("passing `%T' chooses `%T' over `%T'",
                              type, type1, type2);
-                 cp_warning (ec_in_call_to, w->fn);
+                 cp_warning ("  in call to `%D'", w->fn);
                }
              else
                add_warning (w, l);
@@ -4367,10 +4368,10 @@ joust (cand1, cand2, warn)
              tree source = source_type (TREE_VEC_ELT (w->convs, 0));
              if (! DECL_CONSTRUCTOR_P (w->fn))
                source = TREE_TYPE (source);
-             cp_warning (ec_choosing_over, w->fn, l->fn);
-             cp_warning (ec_for_conversion_from_to,
+             cp_warning ("choosing `%D' over `%D'", w->fn, l->fn);
+             cp_warning ("  for conversion from `%T' to `%T'",
                          source, TREE_TYPE (w->second_conv));
-             cp_warning (ec_because_conversion_sequence_for_the_argument_is_better);
+             cp_warning ("  because conversion sequence for the argument is better");
            }
          else
            add_warning (w, l);
index edc46c81e4c2ae34d0a0316d43a4ca9686848a7c..173c69a283091ead42ba0d8d61d73cb895878ce2 100644 (file)
@@ -285,7 +285,7 @@ build_vbase_path (code, type, expr, path, nonnull)
            }
          else
            {
-             cp_error (ec_cannot_cast_up_from_virtual_baseclass,
+             cp_error ("cannot cast up from virtual baseclass `%T'",
                          last_virtual);
              return error_mark_node;
            }
@@ -859,7 +859,7 @@ prepare_fresh_vtable (binfo, for_type)
         ensure that the binfo is from for_type's binfos, not from any
         base type's.  We can remove all this code after a while.  */
       if (binfo1 != binfo)
-       cp_warning (ec_internal_inconsistency_binfo_offset_error_for_rtti);
+       warning ("internal inconsistency: binfo offset error for rtti");
 
       offset = BINFO_OFFSET (binfo1);
     }
@@ -925,7 +925,7 @@ modify_vtable_entry (old_entry_in_list, new_entry, fndecl)
   tree base_fndecl = TREE_OPERAND (FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (old_entry_in_list)), 0);
 
 #ifdef NOTQUITE
-  cp_warning (ec_replaced_with, DECL_ASSEMBLER_NAME (base_fndecl),
+  cp_warning ("replaced %D with %D", DECL_ASSEMBLER_NAME (base_fndecl),
              DECL_ASSEMBLER_NAME (fndecl));
 #endif
   TREE_VALUE (old_entry_in_list) = new_entry;
@@ -980,10 +980,10 @@ add_virtual_function (pv, phv, has_virtual, fndecl, t)
 
 #ifndef DUMB_USER
   if (current_class_type == 0)
-    cp_warning (ec_internal_problem_current_class_type_is_zero_when_adding_please_report,
+    cp_warning ("internal problem, current_class_type is zero when adding `%D', please report",
                fndecl);
   if (current_class_type && t != current_class_type)
-    cp_warning (ec_internal_problem_current_class_type_differs_when_adding_please_report,
+    cp_warning ("internal problem, current_class_type differs when adding `%D', please report",
                fndecl);
 #endif
 
@@ -1218,17 +1218,17 @@ delete_duplicate_fields_1 (field, fields)
                {
                  if (TREE_CODE (field) == CONST_DECL
                      && TREE_CODE (x) == CONST_DECL)
-                   cp_error_at (ec_duplicate_enum_value, x);
+                   cp_error_at ("duplicate enum value `%D'", x);
                  else if (TREE_CODE (field) == CONST_DECL
                           || TREE_CODE (x) == CONST_DECL)
-                   cp_error_at (ec_duplicate_field_as_enum_and_nonenum,
+                   cp_error_at ("duplicate field `%D' (as enum and non-enum)",
                                x);
                  else if (DECL_DECLARES_TYPE_P (field)
                           && DECL_DECLARES_TYPE_P (x))
                    {
                      if (comptypes (TREE_TYPE (field), TREE_TYPE (x), 1))
                        continue;
-                     cp_error_at (ec_duplicate_nested_type, x);
+                     cp_error_at ("duplicate nested type `%D'", x);
                    }
                  else if (DECL_DECLARES_TYPE_P (field)
                           || DECL_DECLARES_TYPE_P (x))
@@ -1239,11 +1239,11 @@ delete_duplicate_fields_1 (field, fields)
                          || (TREE_CODE (x) == TYPE_DECL
                              && DECL_ARTIFICIAL (x)))
                        continue;
-                     cp_error_at (ec_duplicate_field_as_type_and_nontype,
+                     cp_error_at ("duplicate field `%D' (as type and non-type)",
                                   x);
                    }
                  else
-                   cp_error_at (ec_duplicate_member, x);
+                   cp_error_at ("duplicate member `%D'", x);
                  if (prev == 0)
                    fields = TREE_CHAIN (fields);
                  else
@@ -1281,9 +1281,9 @@ alter_access (t, binfo, fdecl, access)
       if (TREE_VALUE (elem) != access)
        {
          if (TREE_CODE (TREE_TYPE (fdecl)) == FUNCTION_DECL)
-           cp_error_at (ec_conflicting_access_specifications_for_method_ignored, TREE_TYPE (fdecl));
+           cp_error_at ("conflicting access specifications for method `%D', ignored", TREE_TYPE (fdecl));
          else
-           cp_error (ec_conflicting_access_specifications_for_field_s_ignored,
+           error ("conflicting access specifications for field `%s', ignored",
                   IDENTIFIER_POINTER (DECL_NAME (fdecl)));
        }
       else
@@ -1332,13 +1332,13 @@ handle_using_decl (using_decl, t, method_vec, fields)
   
   if (name == constructor_name (ctype)
       || name == constructor_name_full (ctype))
-    cp_error_at (ec_usingdeclaration_for_constructor, using_decl);
+    cp_error_at ("using-declaration for constructor", using_decl);
   
   fdecl = lookup_member (binfo, name, 0, 0);
   
   if (!fdecl)
     {
-      cp_error_at (ec_no_members_matching_in, using_decl, ctype);
+      cp_error_at ("no members matching `%D' in `%#T'", using_decl, ctype);
       return;
     }
 
@@ -1362,8 +1362,8 @@ handle_using_decl (using_decl, t, method_vec, fields)
     if (DECL_NAME (OVL_CURRENT (TREE_VEC_ELT (method_vec, i)))
        == name)
       {
-       cp_error (ec_cannot_adjust_access_to_in, fdecl, t);
-       cp_error_at (ec_because_of_local_method_with_same_name,
+       cp_error ("cannot adjust access to `%#D' in `%#T'", fdecl, t);
+       cp_error_at ("  because of local method `%#D' with same name",
                     OVL_CURRENT (TREE_VEC_ELT (method_vec, i)));
        return;
       }
@@ -1375,8 +1375,8 @@ handle_using_decl (using_decl, t, method_vec, fields)
   for (tmp = fields; tmp; tmp = TREE_CHAIN (tmp))
     if (DECL_NAME (tmp) == name)
       {
-       cp_error (ec_cannot_adjust_access_to_in, fdecl, t);
-       cp_error_at (ec_because_of_local_field_with_same_name, tmp);
+       cp_error ("cannot adjust access to `%#D' in `%#T'", fdecl, t);
+       cp_error_at ("  because of local field `%#D' with same name", tmp);
        return;
       }
   
@@ -1606,7 +1606,7 @@ finish_base_struct (t, b)
         dtor is handled in finish_struct_1.  */
       if (warn_ecpp && ! TYPE_VIRTUAL_P (basetype)
          && TYPE_HAS_DESTRUCTOR (basetype))
-       cp_warning (ec_base_class_has_a_nonvirtual_destructor, basetype);
+       cp_warning ("base class `%#T' has a non-virtual destructor", basetype);
 
       /* If the type of basetype is incomplete, then
         we already complained about that fact
@@ -1634,9 +1634,9 @@ finish_base_struct (t, b)
          b->cant_have_default_ctor = 1;
          if (! TYPE_HAS_CONSTRUCTOR (t))
            {
-             cp_pedwarn (ec_base_with_only_nondefault_constructor,
+             cp_pedwarn ("base `%T' with only non-default constructor",
                          basetype);
-             cp_pedwarn (ec_in_class_without_a_constructor);
+             cp_pedwarn ("in class without a constructor");
            }
        }
 
@@ -2037,7 +2037,7 @@ finish_struct_methods (t, fn_fields, nonprivate_method)
          }
       if (nonprivate_method == 0 
          && warn_ctor_dtor_privacy)
-       cp_warning (ec_all_member_functions_in_class_are_private, t);
+       cp_warning ("all member functions in class `%T' are private", t);
     }
 
   /* Warn if all destructors are private (in which case this class is
@@ -2053,7 +2053,7 @@ finish_struct_methods (t, fn_fields, nonprivate_method)
               && CLASSTYPE_FRIEND_CLASSES (t) == NULL_TREE
               && DECL_FRIENDLIST (TYPE_MAIN_DECL (t)) == NULL_TREE
               && warn_ctor_dtor_privacy)
-       cp_warning (ec_only_defines_a_private_destructor_and_has_no_friends,
+       cp_warning ("`%#T' only defines a private destructor and has no friends",
                    t);
     }
 
@@ -2091,8 +2091,8 @@ void
 duplicate_tag_error (t)
      tree t;
 {
-  cp_error (ec_redefinition_of, t);
-  cp_error_at (ec_previous_definition_here, t);
+  cp_error ("redefinition of `%#T'", t);
+  cp_error_at ("previous definition here", t);
 
   /* Pretend we haven't defined this type.  */
 
@@ -2247,9 +2247,9 @@ get_class_offset_1 (parent, binfo, context, t, fndecl)
              && ! tree_int_cst_equal (nrval, rval))
            {
              /* Only give error if the two offsets are different */
-             cp_error (ec_every_virtual_function_must_have_a_unique_final_overrider);
-             cp_error (ec_found_two_or_more_class_subobjects_in, context, t);
-             cp_error (ec_with_virtual_from_virtual_base_class, fndecl);
+             error ("every virtual function must have a unique final overrider");
+             cp_error ("  found two (or more) `%T' class subobjects in `%T'", context, t);
+             cp_error ("  with virtual `%D' from virtual base class", fndecl);
              return rval;
            }
          rval = nrval;
@@ -2396,7 +2396,7 @@ modify_one_vtable (binfo, t, fndecl, pfn)
            }
 
 #ifdef NOTQUITE
-         cp_warning (ec_in, DECL_NAME (BINFO_VTABLE (binfo)));
+         cp_warning ("in %D", DECL_NAME (BINFO_VTABLE (binfo)));
 #endif
          modify_vtable_entry (get_vtable_entry_n (BINFO_VIRTUALS (binfo), n),
                               build_vtable_entry (this_offset, pfn),
@@ -2829,9 +2829,9 @@ check_for_override (decl, ctype)
                 path to its virtual baseclass.  */
              if (TREE_CODE (TREE_TYPE (decl)) == FUNCTION_TYPE)
                {
-                 cp_error_at (ec_method_may_not_be_declared_static,
+                 cp_error_at ("method `%D' may not be declared static",
                               decl);
-                 cp_error_at (ec_since_declared_virtual_in_base_class,
+                 cp_error_at ("(since `%D' declared virtual in base class.)",
                               tmp);
                  break;
                }
@@ -2932,8 +2932,8 @@ warn_hidden (t)
                           TREE_PURPOSE (base_fndecls)))
            {
              /* Here we know it is a hider, and no overrider exists.  */
-             cp_warning_at (ec_was_hidden, TREE_VALUE (base_fndecls));
-             cp_warning_at (ec_by, TREE_PURPOSE (base_fndecls));
+             cp_warning_at ("`%D' was hidden", TREE_VALUE (base_fndecls));
+             cp_warning_at ("  by `%D'", TREE_PURPOSE (base_fndecls));
            }
 
          base_fndecls = TREE_CHAIN (base_fndecls);
@@ -2966,10 +2966,10 @@ finish_struct_anon (t)
                continue;
 
              if (TREE_PRIVATE (*uelt))
-               cp_pedwarn_at (ec_private_member_in_anonymous_union,
+               cp_pedwarn_at ("private member `%#D' in anonymous union",
                               *uelt);
              else if (TREE_PROTECTED (*uelt))
-               cp_pedwarn_at (ec_protected_member_in_anonymous_union,
+               cp_pedwarn_at ("protected member `%#D' in anonymous union",
                               *uelt);
 
              TREE_PRIVATE (*uelt) = TREE_PRIVATE (field);
@@ -3049,12 +3049,12 @@ finish_struct_1 (t, warn_anon)
   int has_pointers = 0;
 
   if (warn_anon && code != UNION_TYPE && ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
-    cp_pedwarn (ec_anonymous_class_type_not_used_to_declare_any_objects);
+    pedwarn ("anonymous class type not used to declare any objects");
 
   if (TYPE_SIZE (t))
     {
       if (IS_AGGR_TYPE (t))
-       cp_error (ec_redefinition_of, t);
+       cp_error ("redefinition of `%#T'", t);
       else
        my_friendly_abort (172);
       popclass (0);
@@ -3161,7 +3161,7 @@ finish_struct_1 (t, warn_anon)
 
       check_for_override (x, t);
       if (DECL_ABSTRACT_VIRTUAL_P (x) && ! DECL_VINDEX (x))
-       cp_error_at (ec_initializer_specified_for_nonvirtual_method, x);
+       cp_error_at ("initializer specified for non-virtual method `%D'", x);
 
       /* The name of the field is the original field name
         Save this in auxiliary field for later overloading.  */
@@ -3218,24 +3218,24 @@ finish_struct_1 (t, warn_anon)
 
       /* ``A local class cannot have static data members.'' ARM 9.4 */
       if (current_function_decl && TREE_STATIC (x))
-       cp_error_at (ec_field_in_local_class_cannot_be_static, x);
+       cp_error_at ("field `%D' in local class cannot be static", x);
 
       /* Perform error checking that did not get done in
         grokdeclarator.  */
       if (TREE_CODE (TREE_TYPE (x)) == FUNCTION_TYPE)
        {
-         cp_error_at (ec_field_invalidly_declared_function_type,
+         cp_error_at ("field `%D' invalidly declared function type",
                       x);
          TREE_TYPE (x) = build_pointer_type (TREE_TYPE (x));
        }
       else if (TREE_CODE (TREE_TYPE (x)) == METHOD_TYPE)
        {
-         cp_error_at (ec_field_invalidly_declared_method_type, x);
+         cp_error_at ("field `%D' invalidly declared method type", x);
          TREE_TYPE (x) = build_pointer_type (TREE_TYPE (x));
        }
       else if (TREE_CODE (TREE_TYPE (x)) == OFFSET_TYPE)
        {
-         cp_error_at (ec_field_invalidly_declared_offset_type, x);
+         cp_error_at ("field `%D' invalidly declared offset type", x);
          TREE_TYPE (x) = build_pointer_type (TREE_TYPE (x));
        }
 
@@ -3260,7 +3260,7 @@ finish_struct_1 (t, warn_anon)
        {
          if (TREE_CODE (t) == UNION_TYPE)
            /* Unions cannot have static members.  */
-           cp_error_at (ec_field_declared_static_in_union, x);
+           cp_error_at ("field `%D' declared static in union", x);
              
          continue;
        }
@@ -3287,9 +3287,9 @@ finish_struct_1 (t, warn_anon)
          if (! TYPE_HAS_CONSTRUCTOR (t) && extra_warnings)
            {
              if (DECL_NAME (x))
-               cp_warning_at (ec_nonstatic_reference_name_in_class_without_a_constructor, x);
+               cp_warning_at ("non-static reference `%#D' in class without a constructor", x);
              else
-               cp_warning_at (ec_nonstatic_reference_in_class_without_a_constructor, x);
+               cp_warning_at ("non-static reference in class without a constructor", x);
            }
        }
 
@@ -3314,9 +3314,9 @@ finish_struct_1 (t, warn_anon)
              && extra_warnings)
            {
              if (DECL_NAME (x))
-               cp_warning_at (ec_nonstatic_const_member_name_in_class_without_a_constructor, x);
+               cp_warning_at ("non-static const member `%#D' in class without a constructor", x);
              else
-               cp_warning_at (ec_nonstatic_const_member_in_class_without_a_constructor, x);
+               cp_warning_at ("non-static const member in class without a constructor", x);
            }
        }
       else
@@ -3346,7 +3346,7 @@ finish_struct_1 (t, warn_anon)
          if (DECL_INITIAL (x)
              && ! INTEGRAL_TYPE_P (TREE_TYPE (x)))
            {
-             cp_error_at (ec_bitfield_with_nonintegral_type, x);
+             cp_error_at ("bit-field `%#D' with non-integral type", x);
              DECL_INITIAL (x) = NULL;
            }
 
@@ -3367,7 +3367,7 @@ finish_struct_1 (t, warn_anon)
 
              if (TREE_CODE (w) != INTEGER_CST)
                {
-                 cp_error_at (ec_bitfield_width_not_an_integer_constant,
+                 cp_error_at ("bit-field `%D' width not an integer constant",
                               x);
                  DECL_INITIAL (x) = NULL_TREE;
                }
@@ -3375,12 +3375,12 @@ finish_struct_1 (t, warn_anon)
                       width < 0)
                {
                  DECL_INITIAL (x) = NULL;
-                 cp_error_at (ec_negative_width_in_bitfield, x);
+                 cp_error_at ("negative width in bit-field `%D'", x);
                }
              else if (width == 0 && DECL_NAME (x) != 0)
                {
                  DECL_INITIAL (x) = NULL;
-                 cp_error_at (ec_zero_width_for_bitfield, x);
+                 cp_error_at ("zero width for bit-field `%D'", x);
                }
              else if (width
                       > TYPE_PRECISION (long_long_unsigned_type_node))
@@ -3390,13 +3390,13 @@ finish_struct_1 (t, warn_anon)
                  DECL_INITIAL (x) = NULL;
                  sorry ("bit-fields larger than %d bits",
                         TYPE_PRECISION (long_long_unsigned_type_node));
-                 cp_error_at (ec_in_declaration_of, x);
+                 cp_error_at ("  in declaration of `%D'", x);
                }
              else if (width > TYPE_PRECISION (TREE_TYPE (x))
                       && TREE_CODE (TREE_TYPE (x)) != ENUMERAL_TYPE
                       && TREE_CODE (TREE_TYPE (x)) != BOOLEAN_TYPE)
                {
-                 cp_warning_at (ec_width_of_exceeds_its_type, x);
+                 cp_warning_at ("width of `%D' exceeds its type", x);
                }
              else if (TREE_CODE (TREE_TYPE (x)) == ENUMERAL_TYPE
                       && ((min_precision (TYPE_MIN_VALUE (TREE_TYPE (x)),
@@ -3404,7 +3404,7 @@ finish_struct_1 (t, warn_anon)
                           || (min_precision (TYPE_MAX_VALUE (TREE_TYPE (x)),
                                              TREE_UNSIGNED (TREE_TYPE (x))) > width)))
                {
-                 cp_warning_at (ec_is_too_small_to_hold_all_values_of,
+                 cp_warning_at ("`%D' is too small to hold all values of `%#T'",
                                 x, TREE_TYPE (x));
                }
 
@@ -3460,7 +3460,7 @@ finish_struct_1 (t, warn_anon)
                  else if (TYPE_HAS_REAL_ASSIGNMENT (type))
                    fie = "assignment operator";
                  if (fie)
-                   cp_error_at (ec_member_with_s_not_allowed_in_union, x,
+                   cp_error_at ("member `%#D' with %s not allowed in union", x,
                                 fie);
                }
              else
@@ -3486,10 +3486,10 @@ finish_struct_1 (t, warn_anon)
                  if (! TYPE_HAS_CONSTRUCTOR (t))
                    {
                      if (DECL_NAME (x))
-                       cp_pedwarn_at (ec_member_decl_with_only_nondefault_constructor, x);
+                       cp_pedwarn_at ("member `%#D' with only non-default constructor", x);
                      else
-                       cp_pedwarn_at (ec_member_with_only_nondefault_constructor, x);
-                     cp_pedwarn_at (ec_in_class_without_a_constructor,
+                       cp_pedwarn_at ("member with only non-default constructor", x);
+                     cp_pedwarn_at ("in class without a constructor",
                                     x);
                    }
 #endif
@@ -3500,7 +3500,7 @@ finish_struct_1 (t, warn_anon)
              /* `build_class_init_list' does not recognize
                 non-FIELD_DECLs.  */
              if (code == UNION_TYPE && any_default_members != 0)
-               cp_error_at (ec_multiple_fields_in_union_initialized);
+               cp_error_at ("multiple fields in union `%T' initialized");
              any_default_members = 1;
            }
        }
@@ -3548,16 +3548,16 @@ finish_struct_1 (t, warn_anon)
   if (has_pointers && warn_ecpp && TYPE_HAS_CONSTRUCTOR (t)
       && ! (TYPE_HAS_INIT_REF (t) && TYPE_HAS_ASSIGN_REF (t)))
     {
-      cp_warning (ec_has_pointer_data_members, t);
+      cp_warning ("`%#T' has pointer data members", t);
       
       if (! TYPE_HAS_INIT_REF (t))
        {
-         cp_warning (ec_but_does_not_override_const, t, t);
+         cp_warning ("  but does not override `%T(const %T&)'", t, t);
          if (! TYPE_HAS_ASSIGN_REF (t))
-           cp_warning (ec_or_operatorconst, t);
+           cp_warning ("  or `operator=(const %T&)'", t);
        }
       else if (! TYPE_HAS_ASSIGN_REF (t))
-       cp_warning (ec_but_does_not_override_operatorconst, t);
+       cp_warning ("  but does not override `operator=(const %T&)'", t);
     }
 
   TYPE_NEEDS_DESTRUCTOR (t) |= TYPE_HAS_DESTRUCTOR (t);
@@ -3630,7 +3630,7 @@ finish_struct_1 (t, warn_anon)
              }
 
          if (nonprivate_ctor == 0 && warn_ctor_dtor_privacy)
-           cp_warning (ec_only_defines_private_constructors_and_has_no_friends,
+           cp_warning ("`%#T' only defines private constructors and has no friends",
                        t);
        }
     }
@@ -3727,8 +3727,8 @@ finish_struct_1 (t, warn_anon)
            if (DECL_NAME (OVL_CURRENT (TREE_VEC_ELT (method_vec, i)))
                == name)
              {
-               cp_error_at (ec_data_member_conflicts_with, x);
-               cp_error_at (ec_function_member,
+               cp_error_at ("data member `%#D' conflicts with", x);
+               cp_error_at ("function member `%#D'",
                             OVL_CURRENT (TREE_VEC_ELT (method_vec, i)));
                break;
              }
@@ -3845,7 +3845,7 @@ finish_struct_1 (t, warn_anon)
     }
     
 #ifdef NOTQUITE
-  cp_warning (ec_oing_hard_virtuals_for, t);
+  cp_warning ("Doing hard virtuals for %T...", t);
 #endif
 
   if (has_virtual > max_has_virtual)
@@ -4075,7 +4075,7 @@ finish_struct_1 (t, warn_anon)
 
       if (warn_nonvdtor && TYPE_HAS_DESTRUCTOR (t)
          && DECL_VINDEX (TREE_VEC_ELT (method_vec, 1)) == NULL_TREE)
-       cp_warning (ec_has_virtual_functions_but_nonvirtual_destructor,
+       cp_warning ("`%#T' has virtual functions but non-virtual destructor",
                    t);
     }
 
@@ -4242,9 +4242,9 @@ finish_struct (t, list_of_fieldlists, attributes, warn_anon)
                  && !(TREE_CODE (icv) == TYPE_DECL
                       && DECL_CONTEXT (icv) == t))
                {
-                 cp_pedwarn_at (ec_declaration_of_identifier_as,
+                 cp_pedwarn_at ("declaration of identifier `%D' as `%+#D'",
                                 name, x);
-                 cp_pedwarn_at (ec_conflicts_with_other_use_in_class_as,
+                 cp_pedwarn_at ("conflicts with other use in class as `%#D'",
                                 icv);
                }
            }
@@ -4347,7 +4347,7 @@ finish_struct (t, list_of_fieldlists, attributes, warn_anon)
   if (current_class_type)
     popclass (0);
   else
-    cp_error (ec_trying_to_finish_struct_but_kicked_out_due_to_previous_parse_errors);
+    error ("trying to finish struct, but kicked out due to previous parse errors.");
 
   return t;
 }
@@ -4787,7 +4787,7 @@ push_lang_context (name)
       current_lang_name = name;
     }
   else
-    cp_error (ec_language_string_not_recognized, IDENTIFIER_POINTER (name));
+    error ("language string `\"%s\"' not recognized", IDENTIFIER_POINTER (name));
 }
   
 /* Get out of the current language scope.  */
@@ -4821,7 +4821,7 @@ validate_lhs (lhstype, complain)
       else
        {
          if (complain)
-           cp_error (ec_invalid_type_combination_for_overload);
+           error ("invalid type combination for overload");
          return error_mark_node;
        }
     }
@@ -4849,7 +4849,7 @@ instantiate_type (lhstype, rhs, complain)
   if (TREE_CODE (lhstype) == UNKNOWN_TYPE)
     {
       if (complain)
-       cp_error (ec_not_enough_type_information);
+       error ("not enough type information");
       return error_mark_node;
     }
 
@@ -4858,7 +4858,7 @@ instantiate_type (lhstype, rhs, complain)
       if (comptypes (lhstype, TREE_TYPE (rhs), 1))
        return rhs;
       if (complain)
-       cp_error (ec_argument_of_type_does_not_match,
+       cp_error ("argument of type `%T' does not match `%T'",
                  TREE_TYPE (rhs), lhstype);
       return error_mark_node;
     }
@@ -4960,14 +4960,14 @@ instantiate_type (lhstype, rhs, complain)
            if (field)
              {
                if (complain)
-                 cp_error (ec_ambiguous_overload_for_requested);
+                 error ("ambiguous overload for COMPONENT_REF requested");
                return error_mark_node;
              }
          }
        else
          {
            if (complain)
-             cp_error (ec_no_appropriate_overload_exists_for);
+             error ("no appropriate overload exists for COMPONENT_REF");
            return error_mark_node;
          }
 #endif
@@ -5004,8 +5004,9 @@ instantiate_type (lhstype, rhs, complain)
            && TREE_CODE (lhstype) != METHOD_TYPE)
          {
            if (complain)
-             cp_error (ec_cannot_resolve_overloaded_function,
-                       DECL_NAME (OVL_FUNCTION (rhs)));
+             cp_error("cannot resolve overloaded function `%D' " 
+                      "based on non-function type", 
+                      DECL_NAME (OVL_FUNCTION (rhs)));
            return error_mark_node;
          }
        
@@ -5047,7 +5048,7 @@ instantiate_type (lhstype, rhs, complain)
                  {
                    if (save_elem)
                      {
-                       cp_error (ec_ambiguous_template_instantiation_converting_to, lhstype);
+                       cp_error ("ambiguous template instantiation converting to `%#T'", lhstype);
                        return error_mark_node;
                      }
                    save_elem = instantiate_template (elem, t);
@@ -5091,10 +5092,11 @@ instantiate_type (lhstype, rhs, complain)
                  {
                    if (complain)
                      {
-                       cp_error (ec_cannot_resolve_overload_to_target_type,
+                       cp_error 
+                         ("cannot resolve overload to target type `%#T'",
                           lhstype);
-                       cp_error_at (ec_ambiguity_between, save_elem); 
-                       cp_error_at (ec_and_at_least, elem);
+                       cp_error_at ("  ambiguity between `%#D'", save_elem); 
+                       cp_error_at ("  and `%#D', at least", elem);
                      }
                    return error_mark_node;
                  }
@@ -5106,8 +5108,9 @@ instantiate_type (lhstype, rhs, complain)
        /* We failed to find a match.  */
        if (complain)
          {
-           cp_error (ec_cannot_resolve_overload_to_target_type, lhstype);
-           cp_error (ec_because_no_suitable_overload_of_function_exists,
+           cp_error ("cannot resolve overload to target type `%#T'", lhstype);
+           cp_error 
+             ("  because no suitable overload of function `%D' exists",
               DECL_NAME (OVL_FUNCTION (rhs)));
          }
        return error_mark_node;
@@ -5176,7 +5179,7 @@ instantiate_type (lhstype, rhs, complain)
                if (elem)
                  {
                    if (complain)
-                     cp_error (ec_ambiguous_overload_for_overloaded_method_requested);
+                     error ("ambiguous overload for overloaded method requested");
                    return error_mark_node;
                  }
                mark_used (save_elem);
@@ -5201,7 +5204,7 @@ instantiate_type (lhstype, rhs, complain)
 #endif
          }
        if (complain)
-         cp_error (ec_no_compatible_member_functions_named, name);
+         cp_error ("no compatible member functions named `%D'", name);
        return error_mark_node;
       }
 
@@ -5259,7 +5262,7 @@ instantiate_type (lhstype, rhs, complain)
     case POSTINCREMENT_EXPR:
     case POSTDECREMENT_EXPR:
       if (complain)
-       cp_error (ec_invalid_operation_on_uninstantiated_type);
+       error ("invalid operation on uninstantiated type");
       return error_mark_node;
 
     case TRUTH_AND_EXPR:
@@ -5275,14 +5278,14 @@ instantiate_type (lhstype, rhs, complain)
     case TRUTH_ORIF_EXPR:
     case TRUTH_NOT_EXPR:
       if (complain)
-       cp_error (ec_not_enough_type_information);
+       error ("not enough type information");
       return error_mark_node;
 
     case COND_EXPR:
       if (type_unknown_p (TREE_OPERAND (rhs, 0)))
        {
          if (complain)
-           cp_error (ec_not_enough_type_information);
+           error ("not enough type information");
          return error_mark_node;
        }
       TREE_OPERAND (rhs, 1)
@@ -5312,7 +5315,7 @@ instantiate_type (lhstype, rhs, complain)
       else if (TREE_CODE (lhstype) != POINTER_TYPE)
        {
          if (complain)
-           cp_error (ec_type_for_resolving_address_of_overloaded_function_must_be_pointer_type);
+           error ("type for resolving address of overloaded function must be pointer type");
          return error_mark_node;
        }
       {
index 43e17970b2426f94a6ee0594de213ff8e2ba0dd3..3c3a8588139a35f60b8931bb6288f566e5d6bf83 100644 (file)
@@ -493,16 +493,6 @@ enum cplus_tree_code {
 };
 #undef DEFTREECODE
 
-/* Error codes.  */
-typedef enum error_code {
-#undef DEFERROR
-#undef DEFERRORNUM
-#define DEFERROR(code, string) code,
-#define DEFERRORNUM(code, string, num) DEFERROR(code, string)
-#include "cp-error.def"
-  ec_last_error_code
-} error_code;
-
 enum languages { lang_c, lang_cplusplus, lang_java };
 
 /* Macros to make error reporting functions' lives easier.  */
@@ -2250,9 +2240,6 @@ extern int flag_new_abi;
 
 extern int flag_honor_std;
 
-/* Nonzero means show diagnostic codes when printing error messages.  */
-extern int flag_diag_codes;
-
 /* Nonzero if we're done parsing and into end-of-file activities.  */
 
 extern int at_eof;
@@ -2640,15 +2627,14 @@ extern tree handle_class_head                   PROTO((tree, tree, tree));
 extern tree lookup_arg_dependent                PROTO((tree, tree, tree));
 
 /* in errfn.c */
-extern void cp_error                           PVPROTO((error_code, ...));
-extern void cp_error_at                                PVPROTO((error_code, ...));
-extern void cp_warning                         PVPROTO((error_code, ...));
-extern void cp_warning_at                      PVPROTO((error_code, ...));
-extern void cp_pedwarn                         PVPROTO((error_code, ...));
-extern void cp_pedwarn_at                      PVPROTO((error_code, ...));
-extern void cp_compiler_error                  PVPROTO((error_code, ...));
-extern void cp_sprintf                         PVPROTO((error_code, ...));
-extern void cp_enable_warning                   PROTO((int, int));
+extern void cp_error                           ();
+extern void cp_error_at                                ();
+extern void cp_warning                         ();
+extern void cp_warning_at                      ();
+extern void cp_pedwarn                         ();
+extern void cp_pedwarn_at                      ();
+extern void cp_compiler_error                  ();
+extern void cp_sprintf                         ();
 
 /* in error.c */
 extern void init_error                         PROTO((void));
index 0580f68a801f76213dc9aec3f0bbe780cef1c4ce..edb2d5b22ad764a68a1dbe2626bd092494f0c308 100644 (file)
@@ -80,7 +80,7 @@ cp_convert_to_pointer (type, expr)
       intype = complete_type (intype);
       if (TYPE_SIZE (intype) == NULL_TREE)
        {
-         cp_error (ec_cant_convert_from_incomplete_type_to,
+         cp_error ("can't convert from incomplete type `%T' to `%T'",
                    intype, type);
          return error_mark_node;
        }
@@ -89,7 +89,7 @@ cp_convert_to_pointer (type, expr)
       if (rval)
        {
          if (rval == error_mark_node)
-           cp_error (ec_conversion_of_from_to_is_ambiguous,
+           cp_error ("conversion of `%E' from `%T' to `%T' is ambiguous",
                      expr, intype, type);
          return rval;
        }
@@ -134,7 +134,7 @@ cp_convert_to_pointer (type, expr)
        {
          if (TREE_CODE (TREE_TYPE (TREE_TYPE (expr))) == METHOD_TYPE)
            if (pedantic || warn_pmf2ptr)
-             cp_pedwarn (ec_converting_from_to, TREE_TYPE (expr),
+             cp_pedwarn ("converting from `%T' to `%T'", TREE_TYPE (expr),
                          type);
          return build1 (NOP_EXPR, type, expr);
        }
@@ -223,7 +223,7 @@ cp_convert_to_pointer (type, expr)
          || (TREE_CODE (type) == POINTER_TYPE
              && TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE))
        {
-         cp_error (ec_cannot_convert_from_type_to_type,
+         cp_error ("cannot convert `%E' from type `%T' to type `%T'",
                    expr, intype, type);
          return error_mark_node;
        }
@@ -262,7 +262,7 @@ cp_convert_to_pointer (type, expr)
       return convert_to_pointer (type, expr);
     }
 
-  cp_error (ec_cannot_convert_from_type_to_type,
+  cp_error ("cannot convert `%E' from type `%T' to type `%T'",
            expr, intype, type);
   return error_mark_node;
 }
@@ -311,7 +311,7 @@ convert_to_pointer_force (type, expr)
          if (distance == -2)
            {
            ambig:
-             cp_error (ec_type_is_ambiguous_baseclass_of_s,
+             cp_error ("type `%T' is ambiguous baseclass of `%s'",
                        TREE_TYPE (type),
                        TYPE_NAME_STRING (TREE_TYPE (intype)));
              return error_mark_node;
@@ -454,19 +454,19 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
            {
              if (decl)
                /* Ensure semantics of [dcl.init.ref] */
-               cp_pedwarn (ec_initialization_of_nonconst_reference_from_rvalue,
+               cp_pedwarn ("initialization of non-const reference `%#T' from rvalue `%T'",
                            reftype, intype);
              else
-               cp_pedwarn (ec_conversion_to_nonconst_from_rvalue,
+               cp_pedwarn ("conversion to non-const `%T' from rvalue `%T'",
                            reftype, intype);
            }
          else if (! (convtype & CONV_CONST))
            {
              if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr))
-               cp_pedwarn (ec_conversion_from_to_discards_const,
+               cp_pedwarn ("conversion from `%T' to `%T' discards const",
                            ttr, reftype);
              else if (! TYPE_VOLATILE (ttl) && TYPE_VOLATILE (ttr))
-               cp_pedwarn (ec_conversion_from_to_discards_volatile,
+               cp_pedwarn ("conversion from `%T' to `%T' discards volatile",
                            ttr, reftype);
            }
        }
@@ -485,7 +485,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
          meant.  */
       if (TREE_CODE (intype) == POINTER_TYPE
          && (comptypes (TREE_TYPE (intype), type, -1)))
-       cp_warning (ec_casting_to_does_not_dereference_pointer,
+       cp_warning ("casting `%T' to `%T' does not dereference pointer",
                    intype, reftype);
          
       rval = build_unary_op (ADDR_EXPR, expr, 0);
@@ -504,7 +504,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
       rval = build_up_reference (reftype, rval, flags, 1);
 
       if (rval && ! TYPE_READONLY (TREE_TYPE (reftype)))
-       cp_pedwarn (ec_initializing_nonconst_with_will_use_a_temporary,
+       cp_pedwarn ("initializing non-const `%T' with `%T' will use a temporary",
                    reftype, intype);
     }
 
@@ -517,7 +517,7 @@ convert_to_reference (reftype, expr, convtype, flags, decl)
   my_friendly_assert (TREE_CODE (intype) != OFFSET_TYPE, 189);
 
   if (flags & LOOKUP_COMPLAIN)
-    cp_error (ec_cannot_convert_type_to_type, intype, reftype);
+    cp_error ("cannot convert type `%T' to type `%T'", intype, reftype);
 
   if (flags & LOOKUP_SPECULATIVELY)
     return NULL_TREE;
@@ -592,11 +592,11 @@ convert_pointer_to_real (binfo, expr)
         but if it is, give them an error message that they can read.  */
       if (distance < 0)
        {
-         cp_error (ec_cannot_convert_a_pointer_of_type_to_a_pointer_of_type,
+         cp_error ("cannot convert a pointer of type `%T' to a pointer of type `%T'",
                    intype, type);
 
          if (distance == -2)
-           cp_error (ec_because_is_an_ambiguous_base_class, type);
+           cp_error ("because `%T' is an ambiguous base class", type);
          return error_mark_node;
        }
 
@@ -704,7 +704,7 @@ ocp_convert (type, expr, convtype, flags)
          && ((ARITHMETIC_TYPE_P (intype) && ! (convtype & CONV_STATIC))
              || (TREE_CODE (intype) == POINTER_TYPE)))
        {
-         cp_pedwarn (ec_conversion_from_to, intype, type);
+         cp_pedwarn ("conversion from `%#T' to `%#T'", intype, type);
 
          if (flag_pedantic_errors)
            return error_mark_node;
@@ -716,7 +716,7 @@ ocp_convert (type, expr, convtype, flags)
          if (rval)
            return rval;
          if (flags & LOOKUP_COMPLAIN)
-           cp_error (ec_used_where_a_was_expected, intype, type);
+           cp_error ("`%#T' used where a `%T' was expected", intype, type);
          if (flags & LOOKUP_SPECULATIVELY)
            return NULL_TREE;
          return error_mark_node;
@@ -726,7 +726,7 @@ ocp_convert (type, expr, convtype, flags)
          /* Common Ada/Pascal programmer's mistake.  We always warn
              about this since it is so bad.  */
          if (TREE_CODE (expr) == FUNCTION_DECL)
-           cp_warning (ec_the_address_of_will_always_be_true, expr);
+           cp_warning ("the address of `%D', will always be `true'", expr);
          return truthvalue_conversion (e);
        }
       return fold (convert_to_integer (type, e));
@@ -744,7 +744,7 @@ ocp_convert (type, expr, convtype, flags)
            return rval;
          else
            if (flags & LOOKUP_COMPLAIN)
-             cp_error (ec_used_where_a_floating_point_value_was_expected,
+             cp_error ("`%#T' used where a floating point value was expected",
                        TREE_TYPE (e));
        }
       if (code == REAL_TYPE)
@@ -818,7 +818,7 @@ ocp_convert (type, expr, convtype, flags)
     return e;
 
   if (flags & LOOKUP_COMPLAIN)
-    cp_error (ec_conversion_from_to_nonscalar_type_requested,
+    cp_error ("conversion from `%T' to non-scalar type `%T' requested",
              TREE_TYPE (expr), type);
   if (flags & LOOKUP_SPECULATIVELY)
     return NULL_TREE;
@@ -948,7 +948,7 @@ build_expr_type_conversion (desires, expr, complain)
   if (expr == null_node 
       && (desires & WANT_INT) 
       && !(desires & WANT_NULL))
-    cp_warning (ec_converting_null_to_nonpointer_type);
+    cp_warning ("converting NULL to non-pointer type");
     
   if (TREE_CODE (basetype) == OFFSET_TYPE)
     expr = resolve_offset_ref (expr);
@@ -1021,9 +1021,9 @@ build_expr_type_conversion (desires, expr, complain)
            {
              if (complain)
                {
-                 cp_error (ec_ambiguous_default_type_conversion_from,
+                 cp_error ("ambiguous default type conversion from `%T'",
                            basetype);
-                 cp_error (ec_candidate_conversions_include_and,
+                 cp_error ("  candidate conversions include `%D' and `%D'",
                            winner, cand);
                }
              return error_mark_node;
index 89cfc2d36c9fea23b473480ac77b2f7484960187..42748ff151666c79f4d3875e90e3cf624b68b59d 100644 (file)
@@ -133,7 +133,7 @@ static struct stack_level *decl_stack;
 
 static tree grokparms                          PROTO((tree, int));
 static tree lookup_nested_type                 PROTO((tree, tree));
-static error_code redeclaration_error_message  PROTO((tree, tree));
+static char *redeclaration_error_message       PROTO((tree, tree));
 static tree push_overloaded_decl               PROTO((tree, int));
 
 static struct stack_level *push_decl_level PROTO((struct stack_level *,
@@ -1117,7 +1117,7 @@ poplevel (keep, reverse, functionbody)
            {
              if (BLOCK_VARS (block) || BLOCK_TYPE_TAGS (block))
                {
-                 cp_warning (ec_internal_compiler_error_debugging_info_corrupted);
+                 warning ("internal compiler error: debugging info corrupted");
                }
              BLOCK_VARS (block) = decls;
              BLOCK_TYPE_TAGS (block) = tags;
@@ -1257,12 +1257,12 @@ poplevel (keep, reverse, functionbody)
 
          if (DECL_INITIAL (label) == NULL_TREE)
            {
-             cp_error_at (ec_label_used_but_not_defined, label);
+             cp_error_at ("label `%D' used but not defined", label);
              /* Avoid crashing later.  */
              define_label (input_filename, 1, DECL_NAME (label));
            }
          else if (warn_unused && !TREE_USED (label))
-           cp_warning_at (ec_label_defined_but_not_used, label);
+           cp_warning_at ("label `%D' defined but not used", label);
          SET_IDENTIFIER_LABEL_VALUE (DECL_NAME (label), NULL_TREE);
 
           /* Put the labels into the "variables" of the
@@ -1808,7 +1808,7 @@ push_namespace (name)
           need_new = 0;
           if (DECL_NAMESPACE_ALIAS (d))
             {
-              cp_error (ec_namespace_alias_not_allowed_here_assuming,
+              cp_error ("namespace alias `%D' not allowed here, assuming `%D'",
                         d, DECL_NAMESPACE_ALIAS (d));
               d = DECL_NAMESPACE_ALIAS (d);
             }
@@ -2520,9 +2520,9 @@ decls_match (newdecl, olddecl)
       if (TREE_CODE (f1) != TREE_CODE (f2))
        {
          if (TREE_CODE (f1) == OFFSET_TYPE)
-           cp_compiler_error (ec_redeclared_as_member_function, newdecl);
+           cp_compiler_error ("`%D' redeclared as member function", newdecl);
          else
-           cp_compiler_error (ec_redeclared_as_nonmember_function, newdecl);
+           cp_compiler_error ("`%D' redeclared as non-member function", newdecl);
          return 0;
        }
 
@@ -2603,6 +2603,11 @@ warn_extern_redeclared_static (newdecl, olddecl)
 {
   tree name;
 
+  static char *explicit_extern_static_warning
+    = "`%D' was declared `extern' and later `static'";
+  static char *implicit_extern_static_warning
+    = "`%D' was declared implicitly `extern' and later `static'";
+
   if (TREE_CODE (newdecl) == TYPE_DECL)
     return;
 
@@ -2618,10 +2623,10 @@ warn_extern_redeclared_static (newdecl, olddecl)
                 || DECL_BUILT_IN_NONANSI (olddecl))))
        {
          cp_pedwarn (IDENTIFIER_IMPLICIT_DECL (name)
-                     ? ec_implicit_extern_static
-                     : ec_explicit_extern_static, newdecl);
+                     ? implicit_extern_static_warning
+                     : explicit_extern_static_warning, newdecl);
          if (olddecl != NULL_TREE)
-           cp_pedwarn_at (ec_previous_declaration_of, olddecl);
+           cp_pedwarn_at ("previous declaration of `%D'", olddecl);
        }
     }
 }
@@ -2669,7 +2674,7 @@ duplicate_decls (newdecl, olddecl)
              && DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl)))
        {
          if (warn_shadow)
-           cp_warning (ec_shadowing_s_function,
+           cp_warning ("shadowing %s function `%#D'",
                        DECL_BUILT_IN (olddecl) ? "built-in" : "library",
                        olddecl);
          /* Discard the old built-in function.  */
@@ -2682,19 +2687,19 @@ duplicate_decls (newdecl, olddecl)
              /* If the built-in is not ansi, then programs can override
                 it even globally without an error.  */
              if (! DECL_BUILT_IN (olddecl))
-               cp_warning (ec_library_function_redeclared_as_nonfunction,
+               cp_warning ("library function `%#D' redeclared as non-function `%#D'",
                            olddecl, newdecl);
              else
                {
-                 cp_error (ec_declaration_of, newdecl);
-                 cp_error (ec_conflicts_with_builtin_declaration,
+                 cp_error ("declaration of `%#D'", newdecl);
+                 cp_error ("conflicts with built-in declaration `%#D'",
                            olddecl);
                }
              return 0;
            }
 
-         cp_warning (ec_declaration_of, newdecl);
-         cp_warning (ec_conflicts_with_builtin_declaration,
+         cp_warning ("declaration of `%#D'", newdecl);
+         cp_warning ("conflicts with built-in declaration `%#D'",
                      olddecl);
        }
     }
@@ -2724,10 +2729,10 @@ duplicate_decls (newdecl, olddecl)
              && DECL_FUNCTION_TEMPLATE_P (newdecl)))
        return 0;
 
-      cp_error (ec_redeclared_as_different_kind_of_symbol, newdecl);
+      cp_error ("`%#D' redeclared as different kind of symbol", newdecl);
       if (TREE_CODE (olddecl) == TREE_LIST)
        olddecl = TREE_VALUE (olddecl);
-      cp_error_at (ec_previous_declaration_of, olddecl);
+      cp_error_at ("previous declaration of `%#D'", olddecl);
 
       /* New decl is completely inconsistent with the old one =>
         tell caller to replace the old one.  */
@@ -2744,8 +2749,8 @@ duplicate_decls (newdecl, olddecl)
          if (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == TYPE_DECL
              || TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == TYPE_DECL)
            {
-             cp_error (ec_declaration_of_template, newdecl);
-             cp_error_at (ec_conflicts_with_previous_declaration,
+             cp_error ("declaration of template `%#D'", newdecl);
+             cp_error_at ("conflicts with previous declaration `%#D'",
                           olddecl);
            }
          else if (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == FUNCTION_DECL
@@ -2755,8 +2760,8 @@ duplicate_decls (newdecl, olddecl)
                   && comp_template_parms (DECL_TEMPLATE_PARMS (newdecl),
                                           DECL_TEMPLATE_PARMS (olddecl)))
            {
-             cp_error (ec_new_declaration, newdecl);
-             cp_error_at (ec_ambiguates_old_declaration, olddecl);
+             cp_error ("new declaration `%#D'", newdecl);
+             cp_error_at ("ambiguates old declaration `%#D'", olddecl);
            }
          return 0;
        }
@@ -2765,15 +2770,15 @@ duplicate_decls (newdecl, olddecl)
          if (DECL_LANGUAGE (newdecl) == lang_c
              && DECL_LANGUAGE (olddecl) == lang_c)
            {
-             cp_error (ec_declaration_of_function_conflicts_with,
+             cp_error ("declaration of C function `%#D' conflicts with",
                        newdecl);
-             cp_error_at (ec_previous_declaration_here, olddecl);
+             cp_error_at ("previous declaration `%#D' here", olddecl);
            }
          else if (compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)),
                              TYPE_ARG_TYPES (TREE_TYPE (olddecl)), 3))
            {
-             cp_error (ec_new_declaration, newdecl);
-             cp_error_at (ec_ambiguates_old_declaration, olddecl);
+             cp_error ("new declaration `%#D'", newdecl);
+             cp_error_at ("ambiguates old declaration `%#D'", olddecl);
            }
          else
            return 0;
@@ -2783,8 +2788,8 @@ duplicate_decls (newdecl, olddecl)
       else if (current_class_type == NULL_TREE
          || IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (newdecl)) != current_class_type)
        {
-         cp_error (ec_conflicting_types_for, newdecl);
-         cp_error_at (ec_previous_declaration_as, olddecl);
+         cp_error ("conflicting types for `%#D'", newdecl);
+         cp_error_at ("previous declaration as `%#D'", olddecl);
        }
     }
   else if (TREE_CODE (newdecl) == FUNCTION_DECL 
@@ -2820,15 +2825,15 @@ duplicate_decls (newdecl, olddecl)
     return 1;
   else
     {
-      error_code ec = redeclaration_error_message (newdecl, olddecl);
-      if (ec != ec_last_error_code)
+      char *errmsg = redeclaration_error_message (newdecl, olddecl);
+      if (errmsg)
        {
-         cp_error (ec, newdecl);
+         cp_error (errmsg, newdecl);
          if (DECL_NAME (olddecl) != NULL_TREE)
            cp_error_at ((DECL_INITIAL (olddecl)
                          && namespace_bindings_p ())
-                        ? ec_previously_defined_here
-                        : ec_previously_declared_here_2, olddecl);
+                        ? "`%#D' previously defined here"
+                        : "`%#D' previously declared here", olddecl);
        }
       else if (TREE_CODE (olddecl) == FUNCTION_DECL
               && DECL_INITIAL (olddecl) != NULL_TREE
@@ -2836,8 +2841,8 @@ duplicate_decls (newdecl, olddecl)
               && TYPE_ARG_TYPES (TREE_TYPE (newdecl)) != NULL_TREE)
        {
          /* Prototype decl follows defn w/o prototype.  */
-         cp_warning_at (ec_prototype_for, newdecl);
-         cp_warning_at (ec_follows_nonprototype_definition_here, olddecl);
+         cp_warning_at ("prototype for `%#D'", newdecl);
+         cp_warning_at ("follows non-prototype definition here", olddecl);
        }
       else if (TREE_CODE (olddecl) == FUNCTION_DECL
               && DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl))
@@ -2849,9 +2854,9 @@ duplicate_decls (newdecl, olddecl)
            DECL_LANGUAGE (newdecl) = DECL_LANGUAGE (olddecl);
          else
            {
-             cp_error_at (ec_previous_declaration_of_with_linkage,
+             cp_error_at ("previous declaration of `%#D' with %L linkage",
                           olddecl, DECL_LANGUAGE (olddecl));
-             cp_error (ec_conflicts_with_new_declaration_with_linkage,
+             cp_error ("conflicts with new declaration with %L linkage",
                        DECL_LANGUAGE (newdecl));
            }
        }
@@ -2876,17 +2881,17 @@ duplicate_decls (newdecl, olddecl)
                  {
                    if (pedantic)
                      {
-                       cp_pedwarn (ec_default_argument_given_for_parameter_d_of,
+                       cp_pedwarn ("default argument given for parameter %d of `%#D'",
                                    i, newdecl);
-                       cp_pedwarn_at (ec_after_previous_specification_in,
+                       cp_pedwarn_at ("after previous specification in `%#D'",
                                       olddecl);
                      }
                  }
                else
                  {
-                   cp_error (ec_default_argument_given_for_parameter_d_of,
+                   cp_error ("default argument given for parameter %d of `%#D'",
                              i, newdecl);
-                   cp_error_at (ec_after_previous_specification_in,
+                   cp_error_at ("after previous specification in `%#D'",
                                 olddecl);
                  }
              }
@@ -2894,9 +2899,9 @@ duplicate_decls (newdecl, olddecl)
          if (DECL_THIS_INLINE (newdecl) && ! DECL_THIS_INLINE (olddecl)
              && TREE_ADDRESSABLE (olddecl) && warn_inline)
            {
-             cp_warning (ec_was_used_before_it_was_declared_inline,
+             cp_warning ("`%#D' was used before it was declared inline",
                          newdecl);
-             cp_warning_at (ec_previous_noninline_declaration_here,
+             cp_warning_at ("previous non-inline declaration here",
                             olddecl);
            }
        }
@@ -2904,8 +2909,8 @@ duplicate_decls (newdecl, olddecl)
       else if (TREE_READONLY (newdecl) != TREE_READONLY (olddecl)
               || TREE_THIS_VOLATILE (newdecl) != TREE_THIS_VOLATILE (olddecl))
        {
-         cp_pedwarn (ec_type_qualifiers_for, newdecl);
-         cp_pedwarn_at (ec_conflict_with_previous_decl, olddecl);
+         cp_pedwarn ("type qualifiers for `%#D'", newdecl);
+         cp_pedwarn_at ("conflict with previous decl `%#D'", olddecl);
        }
     }
 
@@ -2945,8 +2950,8 @@ duplicate_decls (newdecl, olddecl)
          /* Don't warn about friends, let add_friend take care of it. */
          && ! DECL_FRIEND_P (newdecl))
        {
-         cp_warning (ec_redundant_redeclaration_of_in_same_scope, newdecl);
-         cp_warning_at (ec_previous_declaration_of, olddecl);
+         cp_warning ("redundant redeclaration of `%D' in same scope", newdecl);
+         cp_warning_at ("previous declaration of `%D'", olddecl);
        }
     }
 
@@ -2974,7 +2979,7 @@ duplicate_decls (newdecl, olddecl)
     {
       if (! duplicate_decls (DECL_TEMPLATE_RESULT (newdecl),
                             DECL_TEMPLATE_RESULT (olddecl)))
-       cp_error (ec_invalid_redeclaration_of, newdecl);
+       cp_error ("invalid redeclaration of %D", newdecl);
       TREE_TYPE (olddecl) = TREE_TYPE (DECL_TEMPLATE_RESULT (olddecl));
       DECL_TEMPLATE_PARMS (olddecl) = DECL_TEMPLATE_PARMS (newdecl);
       if (DECL_TEMPLATE_INFO (newdecl))
@@ -3022,9 +3027,9 @@ duplicate_decls (newdecl, olddecl)
              && flag_exceptions
              && ! compexcepttypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl)))
            {
-             cp_pedwarn (ec_declaration_of_throws_different_exceptions,
+             cp_pedwarn ("declaration of `%D' throws different exceptions",
                        newdecl);
-             cp_pedwarn_at (ec_previous_declaration_here, olddecl);
+             cp_pedwarn_at ("previous declaration here", olddecl);
            }
        }
       TREE_TYPE (newdecl) = TREE_TYPE (olddecl) = newtype;
@@ -3138,7 +3143,7 @@ duplicate_decls (newdecl, olddecl)
               that specialization that would cause an implicit
               instantiation to take place, in every translation unit in
               which such a use occurs.  */
-           cp_error (ec_explicit_specialization_of_after_first_use
+           cp_error ("explicit specialization of %D after first use"
                      olddecl);
 
          SET_DECL_TEMPLATE_SPECIALIZATION (olddecl);
@@ -3359,7 +3364,7 @@ pushdecl (x)
        {
          /* error_mark_node is 0 for a while during initialization!  */
          t = NULL_TREE;
-         cp_error_at (ec_used_prior_to_declaration, x);
+         cp_error_at ("`%#D' used prior to declaration", x);
        }
 
       else if (t != NULL_TREE)
@@ -3386,7 +3391,7 @@ pushdecl (x)
          else if (t == wchar_decl_node)
            {
              if (pedantic && ! DECL_IN_SYSTEM_HEADER (x))
-               cp_pedwarn (ec_redeclaration_of_wchar_t_as, TREE_TYPE (x));
+               cp_pedwarn ("redeclaration of wchar_t as `%T'", TREE_TYPE (x));
 
              /* Throw away the redeclaration.  */
              return t;
@@ -3410,7 +3415,7 @@ pushdecl (x)
 
                  if (extra_warnings)
                    {
-                     cp_warning (ec_static_missing_from_declaration_of,
+                     cp_warning ("`static' missing from declaration of `%D'",
                                  t);
                      warning_with_file_and_line (file, line,
                                                  "previous declaration of `%s'",
@@ -3443,8 +3448,8 @@ pushdecl (x)
                 [basic.start.main]
 
                 This function shall not be overloaded.  */
-             cp_error_at (ec_invalid_redeclaration_of, t);
-             cp_error (ec_as, x);
+             cp_error_at ("invalid redeclaration of `%D'", t);
+             cp_error ("as `%D'", x);
              /* We don't try to push this declaration since that
                 causes a crash.  */
              return x;
@@ -3512,8 +3517,8 @@ pushdecl (x)
              && TREE_CODE (decl) == TREE_CODE (x)
              && ! comptypes (TREE_TYPE (x), TREE_TYPE (decl), 1))
            {
-             cp_pedwarn (ec_type_mismatch_with_previous_external_decl, x);
-             cp_pedwarn_at (ec_previous_external_decl_of, decl);
+             cp_pedwarn ("type mismatch with previous external decl", x);
+             cp_pedwarn_at ("previous external decl of `%#D'", decl);
            }
        }
 
@@ -3556,7 +3561,8 @@ pushdecl (x)
              /* If this real decl matches the implicit, don't complain.  */
              && ! (TREE_CODE (x) == FUNCTION_DECL
                    && TREE_TYPE (TREE_TYPE (x)) == integer_type_node))
-           cp_warning (ec_was_previously_implicitly_declared_to_return_int, x); 
+           cp_warning
+             ("`%D' was previously implicitly declared to return `int'", x);
 
          /* If new decl is `static' and an `extern' was seen previously,
             warn about it.  */
@@ -3599,8 +3605,8 @@ pushdecl (x)
                /* OK */;
              else
                {
-                 cp_warning (ec_extern_declaration_of_doesnt_match, x);
-                 cp_warning_at (ec_global_declaration, oldglobal);
+                 cp_warning ("extern declaration of `%#D' doesn't match", x);
+                 cp_warning_at ("global declaration `%#D'", oldglobal);
                }
            }
          /* If we have a local external declaration,
@@ -3631,14 +3637,14 @@ pushdecl (x)
 
              /* ARM $8.3 */
              if (b->parm_flag == 1)
-               cp_error (ec_declaration_of_shadows_a_parameter, name);
+               cp_error ("declaration of `%#D' shadows a parameter", name);
            }
          else if (warn_shadow && oldlocal != NULL_TREE && b->is_for_scope
                   && !DECL_DEAD_FOR_LOCAL (oldlocal))
            {
-             cp_warning (ec_variable_s_shadows_local,
+             warning ("variable `%s' shadows local",
                       IDENTIFIER_POINTER (name));
-             cp_warning_at (ec_this_is_the_shadowed_declaration, oldlocal);
+             cp_warning_at ("  this is the shadowed declaration", oldlocal);
            }              
          /* Maybe warn if shadowing something else.  */
          else if (warn_shadow && !DECL_EXTERNAL (x)
@@ -3670,8 +3676,8 @@ pushdecl (x)
            {
              if (decl_template_parm_p (oldlocal))
                {
-                 cp_error (ec_reusing_name_of_template_parameter_in_this_scope, name);
-                 cp_error_at (ec_previously_declared_here, oldlocal);
+                 cp_error ("re-using name of template parameter `%T' in this scope", name);
+                 cp_error_at (" previously declared here `%#D'", oldlocal);
                }
            }
        }
@@ -3819,8 +3825,8 @@ pushdecl_class_level (x)
              && !(DECL_DECLARES_TYPE_P (icv)
                   && DECL_CONTEXT (icv) == current_class_type))
            {
-             cp_pedwarn (ec_declaration_of_identifier_as, name, x);
-             cp_pedwarn_at (ec_conflicts_with_previous_use_in_class_as,
+             cp_pedwarn ("declaration of identifier `%D' as `%#D'", name, x);
+             cp_pedwarn_at ("conflicts with previous use in class as `%#D'",
                             icv);
            }
 
@@ -3831,8 +3837,8 @@ pushdecl_class_level (x)
            {
              if (decl_template_parm_p (ilv))
                {
-                 cp_error (ec_reusing_name_of_template_parameter_in_this_scope, name);
-                 cp_error_at (ec_previously_declared_here, ilv);
+                 cp_error ("re-using name of template parameter `%T' in this scope", name);
+                 cp_error_at (" previously declared here `%#D'", ilv);
                }
            }
        }
@@ -4000,7 +4006,7 @@ push_overloaded_decl (decl, forgettable)
          if (IS_AGGR_TYPE (t) && warn_shadow
              && (! DECL_IN_SYSTEM_HEADER (decl)
                  || ! DECL_IN_SYSTEM_HEADER (old)))
-           cp_warning (ec_hides_constructor_for, decl, t);
+           cp_warning ("`%#D' hides constructor for `%#T'", decl, t);
          old = NULL_TREE;
        }
       else if (is_overloaded_fn (old))
@@ -4014,8 +4020,8 @@ push_overloaded_decl (decl, forgettable)
        }
       else
        {
-         cp_error_at (ec_previous_nonfunction_declaration, old);
-         cp_error (ec_conflicts_with_function_declaration, decl);
+         cp_error_at ("previous non-function declaration `%#D'", old);
+         cp_error ("conflicts with function declaration `%#D'", decl);
          return decl;
        }
     }
@@ -4073,7 +4079,7 @@ implicitly_declare (functionid)
       /* Only one warning per identifier.  */
       && IDENTIFIER_IMPLICIT_DECL (functionid) == NULL_TREE)
     {
-      cp_pedwarn (ec_implicit_declaration_of_function, decl);
+      cp_pedwarn ("implicit declaration of function `%#D'", decl);
     }
 
   SET_IDENTIFIER_IMPLICIT_DECL (functionid, decl);
@@ -4083,13 +4089,13 @@ implicitly_declare (functionid)
   return decl;
 }
 
-/* Return ec_last_error_code if the declaration NEWDECL is valid
+/* Return zero if the declaration NEWDECL is valid
    when the declaration OLDDECL (assumed to be for the same name)
    has already been seen.
    Otherwise return an error message format string with a %s
    where the identifier should go.  */
 
-static error_code
+static char *
 redeclaration_error_message (newdecl, olddecl)
      tree newdecl, olddecl;
 {
@@ -4099,9 +4105,9 @@ redeclaration_error_message (newdecl, olddecl)
         constructs like "typedef struct foo { ... } foo"
         would look like an erroneous redeclaration.  */
       if (comptypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl), 0))
-       return ec_last_error_code;
+       return 0;
       else
-       return ec_redefinition_of;
+       return "redefinition of `%#D'";
     }
   else if (TREE_CODE (newdecl) == FUNCTION_DECL)
     {
@@ -4109,13 +4115,13 @@ redeclaration_error_message (newdecl, olddecl)
         the original initialization to `0' (which we force to call
         abort()).  Don't complain about redefinition in this case.  */
       if (DECL_LANG_SPECIFIC (olddecl) && DECL_ABSTRACT_VIRTUAL_P (olddecl))
-       return ec_last_error_code;
+       return 0;
 
       /* If both functions come from different namespaces, this is not
         a redeclaration - this is a conflict with a used function. */
       if (DECL_NAMESPACE_SCOPE_P (olddecl)
          && DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl))
-       return ec_conflicts_with_used_function;
+       return "`%D' conflicts with used function";
 
       /* We'll complain about linkage mismatches in
          warn_extern_redeclared_static.  */
@@ -4125,11 +4131,11 @@ redeclaration_error_message (newdecl, olddecl)
          && DECL_INITIAL (newdecl) != NULL_TREE)
        {
          if (DECL_NAME (olddecl) == NULL_TREE)
-           return ec_not_declared_in_class;
+           return "`%#D' not declared in class";
          else
-           return ec_redefinition_of;
+           return "redefinition of `%#D'";
        }
-      return ec_last_error_code;
+      return 0;
     }
   else if (TREE_CODE (newdecl) == TEMPLATE_DECL)
     {
@@ -4139,17 +4145,17 @@ redeclaration_error_message (newdecl, olddecl)
          || (TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == TYPE_DECL
              && TYPE_SIZE (TREE_TYPE (newdecl))
              && TYPE_SIZE (TREE_TYPE (olddecl))))
-       return ec_redefinition_of;
-      return ec_last_error_code;
+       return "redefinition of `%#D'";
+      return 0;
     }
   else if (toplevel_bindings_p ())
     {
       /* Objects declared at top level:  */
       /* If at least one is a reference, it's ok.  */
       if (DECL_EXTERNAL (newdecl) || DECL_EXTERNAL (olddecl))
-       return ec_last_error_code;
+       return 0;
       /* Reject two definitions.  */
-      return ec_redefinition_of;
+      return "redefinition of `%#D'";
     }
   else
     {
@@ -4157,8 +4163,8 @@ redeclaration_error_message (newdecl, olddecl)
       /* Reject two definitions, and reject a definition
         together with an external reference.  */
       if (!(DECL_EXTERNAL (newdecl) && DECL_EXTERNAL (olddecl)))
-       return ec_redeclaration_of;
-      return ec_last_error_code;
+       return "redeclaration of `%#D'";
+      return 0;
     }
 }
 \f
@@ -4174,7 +4180,7 @@ lookup_label (id)
 
   if (current_function_decl == NULL_TREE)
     {
-      cp_error (ec_label_s_referenced_outside_of_any_function,
+      error ("label `%s' referenced outside of any function",
             IDENTIFIER_POINTER (id));
       return NULL_TREE;
     }
@@ -4291,11 +4297,11 @@ define_label (filename, line, name)
     }
 
   if (name == get_identifier ("wchar_t"))
-    cp_pedwarn (ec_label_named_wchar_t);
+    cp_pedwarn ("label named wchar_t");
 
   if (DECL_INITIAL (decl) != NULL_TREE)
     {
-      cp_error (ec_duplicate_label, decl);
+      cp_error ("duplicate label `%D'", decl);
       return 0;
     }
   else
@@ -4334,13 +4340,13 @@ define_label (filename, line, name)
                      {
                        if (! identified) 
                          {
-                           cp_error (ec_jump_to_label, decl);
+                           cp_error ("jump to label `%D'", decl);
                            error_with_file_and_line (uses->filename_o_goto,
                                                      uses->lineno_o_goto,
                                                      "  from here");
                            identified = 1;
                        }
-                       cp_error_at (ec_crosses_initialization_of,
+                       cp_error_at ("  crosses initialization of `%#D'",
                                     new_decls);
                      }
                    new_decls = TREE_CHAIN (new_decls);
@@ -4405,12 +4411,12 @@ define_case_label (decl)
   if (cleanup)
     {
       static int explained = 0;
-      cp_warning_at (ec_destructor_needed_for, TREE_PURPOSE (cleanup));
-      cp_warning (ec_where_case_label_appears_here);
+      cp_warning_at ("destructor needed for `%#D'", TREE_PURPOSE (cleanup));
+      warning ("where case label appears here");
       if (!explained)
        {
-         cp_warning (ec_enclose_actions_of_previous_case_statements_requiring);
-         cp_warning (ec_destructors_in_their_own_binding_contours);
+         warning ("(enclose actions of previous case statements requiring");
+         warning ("destructors in their own binding contours.)");
          explained = 1;
        }
     }
@@ -4431,9 +4437,9 @@ define_case_label (decl)
                  || TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (new_decls))))
            {
              if (! identified)
-               cp_error (ec_jump_to_case_label);
+               error ("jump to case label");
              identified = 1;
-             cp_error_at (ec_crosses_initialization_of,
+             cp_error_at ("  crosses initialization of `%#D'",
                           new_decls);
            }
        }
@@ -4543,7 +4549,7 @@ lookup_tag (form, name, binding_level, thislevel_only)
            if (old && TREE_CODE (old) != form
                && !(form != ENUMERAL_TYPE && TREE_CODE (old) == TEMPLATE_DECL))
              {
-               cp_error (ec_redeclared_as, old, form);
+               cp_error ("`%#D' redeclared as %C", old, form);
                return NULL_TREE;
              }
            if (old)
@@ -4563,7 +4569,7 @@ lookup_tag (form, name, binding_level, thislevel_only)
                    && !(form != ENUMERAL_TYPE && code == TEMPLATE_DECL))
                  {
                    /* Definition isn't the kind we were looking for.  */
-                   cp_error (ec_redeclared_as, TREE_VALUE (tail),
+                   cp_error ("`%#D' redeclared as %C", TREE_VALUE (tail),
                              form);
                    return NULL_TREE;
                  }
@@ -4618,7 +4624,7 @@ lookup_tag (form, name, binding_level, thislevel_only)
                            {
                              if (TREE_CODE (TREE_VALUE (these_tags)) != form)
                                {
-                                 cp_error (ec_redeclared_as_in_class_scope,
+                                 cp_error ("`%#D' redeclared as %C in class scope",
                                            TREE_VALUE (tail), form);
                                  return NULL_TREE;
                                }
@@ -4755,7 +4761,7 @@ lookup_namespace_name (namespace, name)
       return val;
     }
 
-  cp_error (ec_undeclared_in_namespace, name, namespace);
+  cp_error ("`%D' undeclared in namespace `%D'", name, namespace);
   return error_mark_node;
 }
 
@@ -4795,7 +4801,7 @@ make_typename_type (context, name)
          if (t == NULL_TREE || TREE_CODE (t) != TEMPLATE_DECL
              || TREE_CODE (DECL_RESULT (t)) != TYPE_DECL)
            {
-             cp_error (ec_no_class_template_named_in,
+             cp_error ("no class template named `%#T' in `%#T'",
                        name, context);
              return error_mark_node;
            }
@@ -4813,7 +4819,7 @@ make_typename_type (context, name)
 
          if (t == NULL_TREE)
            {
-             cp_error (ec_no_type_named_in, name, context);
+             cp_error ("no type named `%#T' in `%#T'", name, context);
              return error_mark_node;
            }
 
@@ -5149,12 +5155,13 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
       if (val && nsval && TREE_CODE (nsval) == TYPE_DECL)
        {
          static int explained;
-         cp_warning (ec_namespacescope_type, nsval);
-         cp_warning (ec_used_instead_of_decl_from_base, val);
+         cp_warning ("namespace-scope type `%#D'", nsval);
+         cp_warning
+           ("  is used instead of `%D' from dependent base class", val);
          if (! explained)
            {
              explained = 1;
-             cp_warning (ec_use_typename_if_thats_what_you_meant,
+             cp_warning ("  (use `typename %D' if that's what you meant)",
                          val);
            }
          val = nsval;
@@ -5171,9 +5178,9 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
              && TREE_CODE (val) == TYPE_DECL
              && TREE_TYPE (from_obj) != TREE_TYPE (val))
            {
-             cp_pedwarn (ec_lookup_of_in_the_scope_of,
+             cp_pedwarn ("lookup of `%D' in the scope of `%#T' (`%#T')",
                          name, got_object, TREE_TYPE (from_obj));
-             cp_pedwarn (ec_does_not_match_lookup_in_the_current_scope,
+             cp_pedwarn ("  does not match lookup in the current scope (`%#T')",
                          TREE_TYPE (val));
            }
 
@@ -6349,7 +6356,7 @@ shadow_tag (declspecs)
       /* ANSI C++ June 5 1992 WP 9.5.3.  Anonymous unions may not have
         function members.  */
       if (TYPE_METHODS (t))
-       cp_error (ec_an_anonymous_union_cannot_have_function_members);
+       error ("an anonymous union cannot have function members");
 
       if (TYPE_FIELDS (t))
        {
@@ -6367,19 +6374,19 @@ shadow_tag (declspecs)
        {
          if (ob_modifier == ridpointers[(int) RID_INLINE]
              || ob_modifier == ridpointers[(int) RID_VIRTUAL])
-           cp_error (ec_can_only_be_specified_for_functions, ob_modifier);
+           cp_error ("`%D' can only be specified for functions", ob_modifier);
          else if (ob_modifier == ridpointers[(int) RID_EXPLICIT])
-           cp_error (ec_can_only_be_specified_for_constructors,
+           cp_error ("`%D' can only be specified for constructors",
                      ob_modifier);
          else
-           cp_error (ec_can_only_be_specified_for_objects_and_functions,
+           cp_error ("`%D' can only be specified for objects and functions",
                      ob_modifier);
        }
 
       if (found_tag == 0)
-       cp_error (ec_abstract_declarator_used_as_declaration);
+       cp_error ("abstract declarator used as declaration");
       else if (found_tag > 1)
-       cp_pedwarn (ec_multiple_types_in_one_declaration);
+       pedwarn ("multiple types in one declaration");
     }
 }
 \f
@@ -6496,13 +6503,13 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
           Any other case of an initialization in a TYPE_DECL is an error.  */
        if (pedantic || list_length (declspecs) > 1)
          {
-           cp_error (ec_typedef_is_initialized, decl);
+           cp_error ("typedef `%D' is initialized", decl);
            initialized = 0;
          }
        break;
 
       case FUNCTION_DECL:
-       cp_error (ec_function_is_initialized_like_a_variable, decl);
+       cp_error ("function `%#D' is initialized like a variable", decl);
        initialized = 0;
        break;
 
@@ -6514,7 +6521,8 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
                if (TYPE_SIZE (type) != NULL_TREE
                    && ! TREE_CONSTANT (TYPE_SIZE (type)))
                  {
-                   cp_error (ec_variablesized_object_may_not_be_initialized,
+                   cp_error
+                     ("variable-sized object `%D' may not be initialized",
                       decl);
                    initialized = 0;
                  }
@@ -6522,7 +6530,8 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
                if (TREE_CODE (type) == ARRAY_TYPE
                    && TYPE_SIZE (complete_type (TREE_TYPE (type))) == NULL_TREE)
                  {
-                   cp_error (ec_elements_of_array_have_incomplete_type, decl);
+                   cp_error
+                     ("elements of array `%#D' have incomplete type", decl);
                    initialized = 0;
                  }
              }
@@ -6533,7 +6542,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
     {
       if (! toplevel_bindings_p ()
          && DECL_EXTERNAL (decl))
-       cp_warning (ec_declaration_of_has_extern_and_is_initialized,
+       cp_warning ("declaration of `%#D' has `extern' and is initialized",
                    decl);
       DECL_EXTERNAL (decl) = 0;
       if (toplevel_bindings_p ())
@@ -6551,12 +6560,12 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
        {
          tree field = lookup_field (context, DECL_NAME (decl), 0, 0);
          if (field == NULL_TREE || TREE_CODE (field) != VAR_DECL)
-           cp_error (ec_is_not_a_static_member_of, decl, context);
+           cp_error ("`%#D' is not a static member of `%#T'", decl, context);
          else
            {
              if (DECL_CONTEXT (field) != context)
                {
-                 cp_pedwarn (ec_does_not_permit_to_be_defined_as,
+                 cp_pedwarn ("ANSI C++ does not permit `%T::%D' to be defined as `%T::%D'",
                              DECL_CONTEXT (field), DECL_NAME (decl),
                              context, DECL_NAME (decl));
                  DECL_CONTEXT (decl) = DECL_CONTEXT (field);
@@ -6567,7 +6576,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
                 initialization.  Thus, duplicate_decls won't warn
                 about this situation, and so we check here.  */
              if (DECL_INITIAL (decl) && DECL_INITIAL (field))
-               cp_error (ec_duplicate_initialization_of, decl);
+               cp_error ("duplicate initialization of %D", decl);
              if (duplicate_decls (decl, field))
                decl = field;
            }
@@ -6586,7 +6595,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
        SET_DECL_TEMPLATE_SPECIALIZATION (decl);
 
       if (DECL_EXTERNAL (decl) && ! DECL_TEMPLATE_SPECIALIZATION (decl))
-       cp_pedwarn (ec_declaration_of_outside_of_class_is_not_definition,
+       cp_pedwarn ("declaration of `%#D' outside of class is not definition",
                    decl);
 
       pushclass (context, 2);
@@ -6697,7 +6706,7 @@ start_decl_1 (decl)
        ;                       /* A complete type is ok.  */
       else if (TREE_CODE (type) != ARRAY_TYPE)
        {
-         cp_error (ec_variable_has_initializer_but_incomplete_type,
+         cp_error ("variable `%#D' has initializer but incomplete type",
                    decl);
          initialized = 0;
          type = TREE_TYPE (decl) = error_mark_node;
@@ -6705,7 +6714,7 @@ start_decl_1 (decl)
       else if (TYPE_SIZE (complete_type (TREE_TYPE (type))) == NULL_TREE)
        {
          if (DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl))
-           cp_error (ec_elements_of_array_have_incomplete_type, decl);
+           cp_error ("elements of array `%#D' have incomplete type", decl);
          /* else we already gave an error in start_decl.  */
          initialized = 0;
        }
@@ -6719,7 +6728,7 @@ start_decl_1 (decl)
       if ((! processing_template_decl || ! uses_template_parms (type))
          && TYPE_SIZE (complete_type (type)) == NULL_TREE)
        {
-         cp_error (ec_aggregate_has_incomplete_type_and_cannot_be_initialized,
+         cp_error ("aggregate `%#D' has incomplete type and cannot be initialized",
                 decl);
          /* Change the type so that assemble_variable will give
             DECL an rtl we can live with: (mem (const_int 0)).  */
@@ -6776,7 +6785,7 @@ grok_reference_init (decl, type, init)
           || DECL_IN_AGGR_P (decl) == 0)
          && ! DECL_THIS_EXTERN (decl))
        {
-         cp_error (ec_declared_as_reference_but_not_initialized, decl);
+         cp_error ("`%D' declared as reference but not initialized", decl);
          if (TREE_CODE (decl) == VAR_DECL)
            SET_DECL_REFERENCE_SLOT (decl, error_mark_node);
        }
@@ -6789,7 +6798,7 @@ grok_reference_init (decl, type, init)
   if (TREE_CODE (type) == REFERENCE_TYPE
       && TREE_CODE (init) == CONSTRUCTOR)
     {
-      cp_error (ec_forbids_use_of_initializer_list_to_initialize_reference, decl);
+      cp_error ("ANSI C++ forbids use of initializer list to initialize reference `%D'", decl);
       return;
     }
 
@@ -6823,7 +6832,7 @@ grok_reference_init (decl, type, init)
     }
   else
     {
-      cp_error (ec_cannot_initialize_from, type, TREE_TYPE (init));
+      cp_error ("cannot initialize `%T' from `%T'", type, TREE_TYPE (init));
       goto fail;
     }
 
@@ -6918,7 +6927,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
   if (! decl)
     {
       if (init)
-       cp_error (ec_assignment_not_initialization_in_declaration);
+       error ("assignment (not initialization) in declaration");
       return;
     }
 
@@ -6928,7 +6937,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
 
   if (init && TREE_CODE (init) == NAMESPACE_DECL)
     {
-      cp_error (ec_annot_initialize_to_namespace,
+      cp_error ("Cannot initialize `%D' to namespace `%D'",
                decl, init);
       init = NULL_TREE;
     }
@@ -6993,7 +7002,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
          && IS_AGGR_TYPE (type) && DECL_NAME (decl))
        {
          if (TREE_TYPE (DECL_NAME (decl)) && TREE_TYPE (decl) != type)
-           cp_warning (ec_shadowing_previous_type_declaration_of, decl);
+           cp_warning ("shadowing previous type declaration of `%#D'", decl);
          set_identifier_type_value (DECL_NAME (decl), type);
          CLASSTYPE_GOT_SEMICOLON (type) = 1;
        }
@@ -7081,7 +7090,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
            {
              if (TYPE_NON_AGGREGATE_CLASS (type))
                {
-                 cp_error (ec_must_be_initialized_by_constructor_not_by,
+                 cp_error ("`%D' must be initialized by constructor, not by `{...}'",
                            decl);
                  init = error_mark_node;
                }
@@ -7112,9 +7121,9 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
       if (! TYPE_NEEDS_CONSTRUCTING (ctype))
        {
          if (CLASSTYPE_READONLY_FIELDS_NEED_INIT (ctype))
-           cp_error (ec_structure_with_uninitialized_const_members, decl);
+           cp_error ("structure `%D' with uninitialized const members", decl);
          if (CLASSTYPE_REF_FIELDS_NEED_INIT (ctype))
-           cp_error (ec_structure_with_uninitialized_reference_members,
+           cp_error ("structure `%D' with uninitialized reference members",
                      decl);
        }
 
@@ -7122,7 +7131,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
          && !DECL_INITIAL (decl)
          && !TYPE_NEEDS_CONSTRUCTING (type)
          && (TYPE_READONLY (type) || TREE_READONLY (decl)))
-       cp_error (ec_uninitialized_const, decl);
+       cp_error ("uninitialized const `%D'", decl);
 
       if (TYPE_SIZE (type) != NULL_TREE
          && TYPE_NEEDS_CONSTRUCTING (type))
@@ -7141,7 +7150,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
       if (! DECL_INITIAL (decl)
          && TREE_CODE (type) != ARRAY_TYPE
          && (!pedantic || !current_class_type))
-       cp_error (ec_uninitialized_const, decl);
+       cp_error ("uninitialized const `%#D'", decl);
     }
 
   /* For top-level declaration, the initial value was read in
@@ -7168,12 +7177,12 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
       int failure = complete_array_type (type, initializer, do_default);
 
       if (failure == 1)
-       cp_error (ec_initializer_fails_to_determine_size_of, decl);
+       cp_error ("initializer fails to determine size of `%D'", decl);
 
       if (failure == 2)
        {
          if (do_default)
-           cp_error (ec_array_size_missing_in, decl);
+           cp_error ("array size missing in `%D'", decl);
          /* If a `static' var's size isn't known, make it extern as
             well as static, so it does not get allocated.  If it's not
             `static', then don't mark it extern; finish_incomplete_decl
@@ -7185,7 +7194,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
       if (pedantic && TYPE_DOMAIN (type) != NULL_TREE
          && tree_int_cst_lt (TYPE_MAX_VALUE (TYPE_DOMAIN (type)),
                              integer_zero_node))
-       cp_error (ec_zerosize_array, decl);
+       cp_error ("zero-size array `%D'", decl);
 
       layout_decl (decl, 0);
     }
@@ -7203,7 +7212,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
             Otherwise, let it through, but if it is not `extern'
             then it may cause an error message later.  */
          if (DECL_INITIAL (decl) != NULL_TREE)
-           cp_error (ec_storage_size_of_isnt_known, decl);
+           cp_error ("storage size of `%D' isn't known", decl);
          init = NULL_TREE;
        }
       else if (!DECL_EXTERNAL (decl) && DECL_SIZE (decl) == NULL_TREE)
@@ -7211,7 +7220,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
          /* An automatic variable with an incomplete type: that is an error.
             Don't talk about array types here, since we took care of that
             message in grokdeclarator.  */
-         cp_error (ec_storage_size_of_isnt_known, decl);
+         cp_error ("storage size of `%D' isn't known", decl);
          TREE_TYPE (decl) = error_mark_node;
        }
       else if (!DECL_EXTERNAL (decl) && IS_AGGR_TYPE (ttype))
@@ -7228,7 +7237,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
          if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
            constant_expression_warning (DECL_SIZE (decl));
          else
-           cp_error (ec_storage_size_of_isnt_constant, decl);
+           cp_error ("storage size of `%D' isn't constant", decl);
        }
 
       if (! DECL_EXTERNAL (decl) && TYPE_NEEDS_DESTRUCTOR (type)
@@ -7450,7 +7459,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
                  /* XXX: Why don't we use decl here?  */
                  /* Ans: Because it was already expanded? */
                  if (! expand_decl_cleanup (NULL_TREE, cleanup))
-                   cp_error (ec_parser_lost_in_parsing_declaration_of,
+                   cp_error ("parser lost in parsing declaration of `%D'",
                              decl);
                  /* Cleanup used up here.  */
                  cleanup = NULL_TREE;
@@ -7546,7 +7555,7 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
              if (cleanup)
                {
                  if (! expand_decl_cleanup (decl, cleanup))
-                   cp_error (ec_parser_lost_in_parsing_declaration_of,
+                   cp_error ("parser lost in parsing declaration of `%D'",
                              decl);
                }
            }
@@ -7625,7 +7634,7 @@ expand_static_init (decl, init)
   if (oldstatic)
     {
       if (TREE_PURPOSE (oldstatic) && init != NULL_TREE)
-       cp_error (ec_multiple_initializations_given_for, decl);
+       cp_error ("multiple initializations given for `%D'", decl);
     }
   else if (! toplevel_bindings_p () && ! pseudo_global_level_p ())
     {
@@ -7822,16 +7831,16 @@ bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises)
      int virtualp, quals, friendp, raises, inlinep;
 {
   if (virtualp)
-    cp_error (ec_declared_as_a_virtual_s, object, type);
+    cp_error ("`%D' declared as a `virtual' %s", object, type);
   if (inlinep)
-    cp_error (ec_declared_as_an_inline_s, object, type);
+    cp_error ("`%D' declared as an `inline' %s", object, type);
   if (quals)
-    cp_error (ec_const_and_volatile_function_specifiers_on_invalid_in_s_declaration,
+    cp_error ("`const' and `volatile' function specifiers on `%D' invalid in %s declaration",
              object, type);
   if (friendp)
-    cp_error_at (ec_invalid_friend_declaration, object);
+    cp_error_at ("invalid friend declaration", object);
   if (raises)
-    cp_error_at (ec_invalid_exception_specifications, object);
+    cp_error_at ("invalid exception specifications", object);
 }
 
 /* CTYPE is class type, or null if non-class.
@@ -7896,9 +7905,9 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
   if (ctype == NULL_TREE && MAIN_NAME_P (declarator))
     {
       if (inlinep)
-       cp_error (ec_cannot_declare_main_to_be_inline);
+       error ("cannot declare `main' to be inline");
       else if (! publicp)
-       cp_error (ec_cannot_declare_main_to_be_static);
+       error ("cannot declare `main' to be static");
       inlinep = 0;
       publicp = 1;
     }
@@ -7918,9 +7927,9 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
       if (t)
        {
          if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
-           cp_pedwarn (ec_nonlocal_function_uses_anonymous_type, decl);
+           cp_pedwarn ("non-local function `%#D' uses anonymous type", decl);
          else
-           cp_pedwarn (ec_nonlocal_function_uses_local_type,
+           cp_pedwarn ("non-local function `%#D' uses local type `%T'",
                        decl, t);
        }
     }
@@ -7938,7 +7947,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
   DECL_EXTERNAL (decl) = 1;
   if (quals != NULL_TREE && TREE_CODE (type) == FUNCTION_TYPE)
     {
-      cp_error (ec_smember_function_cannot_have_method_qualifier,
+      cp_error ("%smember function `%D' cannot have `%T' method qualifier",
                (ctype ? "static " : "non-"), decl, TREE_VALUE (quals));
       quals = NULL_TREE;
     }
@@ -7961,14 +7970,15 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
       && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR)
     {
       if (funcdef_flag)
-       cp_error (ec_defining_explicit_specialization_in_friend_declaration,
+       cp_error
+         ("defining explicit specialization `%D' in friend declaration",
           orig_declarator);
       else
        {
          if (PROCESSING_REAL_TEMPLATE_DECL_P ())
            {
              /* Something like `template <class T> friend void f<T>()'.  */
-             cp_error (ec_templateid_in_declaration_of_primary_template
+             cp_error ("template-id `%D' in declaration of primary template"
                        orig_declarator);
              return error_mark_node;
            }
@@ -8018,7 +8028,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
            tmp = DECL_TEMPLATE_RESULT(tmp);
 
          if (tmp && DECL_ARTIFICIAL (tmp))
-           cp_error (ec_definition_of_implicitlydeclared, tmp);
+           cp_error ("definition of implicitly-declared `%D'", tmp);
          if (tmp && duplicate_decls (decl, tmp))
            return tmp;
        }
@@ -8032,7 +8042,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
          if (tmp == NULL_TREE)
            SET_IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (decl), decl);
          else if (TREE_CODE (tmp) != TREE_CODE (decl))
-           cp_error (ec_inconsistent_declarations_for, decl);
+           cp_error ("inconsistent declarations for `%D'", decl);
          else
            {
              duplicate_decls (decl, tmp);
@@ -8076,7 +8086,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
              last_function_parms = TREE_CHAIN (last_function_parms);
            }
          if (tmp && DECL_ARTIFICIAL (tmp))
-           cp_error (ec_definition_of_implicitlydeclared, tmp);
+           cp_error ("definition of implicitly-declared `%D'", tmp);
          if (tmp)
            {
              if (!duplicate_decls (decl, tmp))
@@ -8106,7 +8116,7 @@ grokfndecl (ctype, type, declarator, orig_declarator, virtualp, flags, quals,
              if (tmp == NULL_TREE)
                SET_IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (decl), decl);
              else if (TREE_CODE (tmp) != TREE_CODE (decl))
-               cp_error (ec_inconsistent_declarations_for, decl);
+               cp_error ("inconsistent declarations for `%D'", decl);
              else
                {
                  duplicate_decls (decl, tmp);
@@ -8210,7 +8220,7 @@ grokvardecl (type, declarator, specbits_in, initialized, constp, in_namespace)
          if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
            /* Ignore for now; `enum { foo } e' is pretty common.  */;
          else
-           cp_pedwarn (ec_nonlocal_variable_uses_local_type,
+           cp_pedwarn ("non-local variable `%#D' uses local type `%T'",
                        decl, t);
        }
     }
@@ -8418,7 +8428,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                {
                  if (current_class_type == NULL_TREE)
                    {
-                     cp_error (ec_destructors_must_be_member_functions);
+                     error ("destructors must be member functions");
                      flags = NO_SPECIAL;
                    }
                  else
@@ -8437,7 +8447,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
              if (rename)
                {
-                 cp_error (ec_destructor_must_match_class_name,
+                 cp_error ("destructor `%T' must match class name `%T'",
                            name, rename);
                  TREE_OPERAND (decl, 0) = rename;
                }
@@ -8518,7 +8528,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
            if (is_rid (dname))
              {
-               cp_error (ec_declaratorid_missing_using_reserved_word,
+               cp_error ("declarator-id missing; using reserved word `%D'",
                          dname);
                name = IDENTIFIER_POINTER (dname);
              }
@@ -8562,9 +8572,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              else if (TREE_CODE (cname) == TEMPLATE_TYPE_PARM
                       || TREE_CODE (cname) == TEMPLATE_TEMPLATE_PARM)
                {
-                 cp_error (ec_is_not_a_valid_declarator, cname,
+                 cp_error ("`%T::%D' is not a valid declarator", cname,
                            TREE_OPERAND (decl, 1));
-                 cp_error (ec_perhaps_you_want_typename_to_make_it_a_type,
+                 cp_error ("  perhaps you want `typename %T::%D' to make it a type",
                            cname, TREE_OPERAND (decl, 1));
                  return void_type_node;
                }
@@ -8576,7 +8586,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                {
                  if (! UNIQUELY_DERIVED_FROM_P (cname, ctype))
                    {
-                     cp_error (ec_type_is_not_derived_from_type,
+                     cp_error ("type `%T' is not derived from type `%T'",
                                cname, ctype);
                      TREE_OPERAND (decl, 0) = NULL_TREE;
                    }
@@ -8622,9 +8632,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          case TYPE_DECL:
            /* Parse error puts this typespec where
               a declarator should go.  */
-           cp_error (ec_specified_as_declaratorid, DECL_NAME (decl));
+           cp_error ("`%T' specified as declarator-id", DECL_NAME (decl));
            if (TREE_TYPE (decl) == current_class_type)
-             cp_error (ec_perhaps_you_want_for_a_constructor,
+             cp_error ("  perhaps you want `%T' for a constructor",
                        current_class_name);
            dname = DECL_NAME (decl);
            name = IDENTIFIER_POINTER (dname);
@@ -8639,7 +8649,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            break;
 
          default:
-           cp_compiler_error (ec_as_declarator, decl);
+           cp_compiler_error ("`%D' as declarator", decl);
            return 0; /* We used to do a 155 abort here.  */
          }
       }
@@ -8657,7 +8667,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
       && innermost_code != CALL_EXPR
       && ! (ctype && declspecs == NULL_TREE))
     {
-      cp_error (ec_declaration_of_as_nonfunction, dname);
+      cp_error ("declaration of `%D' as non-function", dname);
       return void_type_node;
     }
 
@@ -8724,9 +8734,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              if (type)
                {
                  if (id == ridpointers[(int) RID_BOOL])
-                   cp_error (ec_bool_is_now_a_keyword);
+                   error ("`bool' is now a keyword");
                  else
-                   cp_error (ec_extraneous_ignored, id);
+                   cp_error ("extraneous `%T' ignored", id);
                }
              else
                {
@@ -8742,7 +8752,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          if (IDENTIFIER_HAS_TYPE_VALUE (id))
            {
              if (type)
-               cp_error (ec_multiple_declarations_and, type, id);
+               cp_error ("multiple declarations `%T' and `%T'", type, id);
              else
                type = IDENTIFIER_TYPE_VALUE (id);
              goto found;
@@ -8755,14 +8765,14 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                  if (i == (int) RID_LONG && RIDBIT_SETP (i, specbits))
                    {
                      if (pedantic && ! in_system_header && warn_long_long)
-                       cp_pedwarn (ec_does_not_support_long_long);
+                       pedwarn ("ANSI C++ does not support `long long'");
                      if (longlong)
-                       cp_error (ec_long_long_long_is_too_long_for);
+                       error ("`long long long' is too long for GCC");
                      else
                        longlong = 1;
                    }
                  else if (RIDBIT_SETP (i, specbits))
-                   cp_pedwarn (ec_duplicate_s, IDENTIFIER_POINTER (id));
+                   pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id));
                  RIDBIT_SET (i, specbits);
                  goto found;
                }
@@ -8772,7 +8782,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
       else if (TREE_CODE (id) == TYPE_DECL || TREE_CODE (id) == TEMPLATE_DECL)
        {
          if (type)
-           cp_error (ec_multiple_declarations_and, type,
+           cp_error ("multiple declarations `%T' and `%T'", type,
                      TREE_TYPE (id));
          else
            {
@@ -8782,12 +8792,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          goto found;
        }
       if (type)
-       cp_error (ec_two_or_more_data_types_in_declaration_of_s, name);
+       error ("two or more data types in declaration of `%s'", name);
       else if (TREE_CODE (id) == IDENTIFIER_NODE)
        {
          register tree t = lookup_name (id, 1);
          if (!t || TREE_CODE (t) != TYPE_DECL)
-           cp_error (ec_s_fails_to_be_a_typedef_or_built_in_type,
+           error ("`%s' fails to be a typedef or built in type",
                   IDENTIFIER_POINTER (id));
          else
            {
@@ -8853,14 +8863,14 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                warn_about_return_type = 1;
            }
          else if (RIDBIT_SETP (RID_TYPEDEF, specbits))
-           cp_pedwarn (ec_forbids_typedef_which_does_not_specify_a_type);
+           pedwarn ("ANSI C++ forbids typedef which does not specify a type");
          else if (innermost_code != CALL_EXPR || pedantic
                   || (warn_return_type && return_type == return_normal))
            {
              if (innermost_code == CALL_EXPR)
-               cp_pedwarn (ec_returntype_of_defaults_to_int, dname);
+               cp_pedwarn ("return-type of `%D' defaults to `int'", dname);
              else
-               cp_pedwarn (ec_forbids_declaration_with_no_type,
+               cp_pedwarn ("ANSI C++ forbids declaration `%D' with no type",
                            dname);
            }
          type = integer_type_node;
@@ -8868,21 +8878,21 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
     }
   else if (return_type == return_dtor)
     {
-      cp_error (ec_return_type_specification_for_destructor_invalid);
+      error ("return type specification for destructor invalid");
       type = void_type_node;
     }
   else if (return_type == return_ctor)
     {
-      cp_error (ec_return_type_specification_for_constructor_invalid);
+      error ("return type specification for constructor invalid");
       type = build_pointer_type (ctor_return_type);
     }
   else if (return_type == return_conversion)
     {
       if (comptypes (type, ctor_return_type, 1) == 0)
-       cp_error (ec_operator_declared_to_return,
+       cp_error ("operator `%T' declared to return `%T'",
                  ctor_return_type, type);
       else
-       cp_pedwarn (ec_return_type_specified_for_operator,
+       cp_pedwarn ("return type specified for `operator %T'",
                    ctor_return_type);
 
       type = ctor_return_type;
@@ -8913,29 +8923,29 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
       int ok = 0;
 
       if (TREE_CODE (type) == REAL_TYPE)
-       cp_error (ec_short_signed_or_unsigned_invalid_for_s, name);
+       error ("short, signed or unsigned invalid for `%s'", name);
       else if (TREE_CODE (type) != INTEGER_TYPE)
-       cp_error (ec_long_short_signed_or_unsigned_invalid_for_s, name);
+       error ("long, short, signed or unsigned invalid for `%s'", name);
       else if (RIDBIT_SETP (RID_LONG, specbits)
               && RIDBIT_SETP (RID_SHORT, specbits))
-       cp_error (ec_long_and_short_specified_together_for_s, name);
+       error ("long and short specified together for `%s'", name);
       else if ((RIDBIT_SETP (RID_LONG, specbits)
                || RIDBIT_SETP (RID_SHORT, specbits))
               && explicit_char)
-       cp_error (ec_long_or_short_specified_with_char_for_s, name);
+       error ("long or short specified with char for `%s'", name);
       else if ((RIDBIT_SETP (RID_LONG, specbits)
                || RIDBIT_SETP (RID_SHORT, specbits))
               && TREE_CODE (type) == REAL_TYPE)
-       cp_error (ec_long_or_short_specified_with_floating_type_for_s, name);
+       error ("long or short specified with floating type for `%s'", name);
       else if (RIDBIT_SETP (RID_SIGNED, specbits)
               && RIDBIT_SETP (RID_UNSIGNED, specbits))
-       cp_error (ec_signed_and_unsigned_given_together_for_s, name);
+       error ("signed and unsigned given together for `%s'", name);
       else
        {
          ok = 1;
          if (!explicit_int && !defaulted_int && !explicit_char && pedantic)
            {
-             cp_pedwarn (ec_long_short_signed_or_unsigned_used_invalidly_for_s,
+             pedwarn ("long, short, signed or unsigned used invalidly for `%s'",
                       name);
              if (flag_pedantic_errors)
                ok = 0;
@@ -8956,7 +8966,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
   if (RIDBIT_SETP (RID_COMPLEX, specbits)
       && TREE_CODE (type) != INTEGER_TYPE && TREE_CODE (type) != REAL_TYPE)
     {
-      cp_error (ec_complex_invalid_for_s, name);
+      error ("complex invalid for `%s'", name);
       RIDBIT_RESET (RID_COMPLEX, specbits);
     }
 
@@ -9023,7 +9033,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
   if (return_type == return_conversion 
       && (RIDBIT_SETP (RID_CONST, specbits)
          || RIDBIT_SETP (RID_VOLATILE, specbits)))
-    cp_error (ec_operator_cannot_be_cvqualified,
+    cp_error ("`operator %T' cannot be cv-qualified",
              ctor_return_type);
 
   /* Set CONSTP if this declaration is `const', whether by
@@ -9045,7 +9055,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
   if (virtualp && staticp == 2)
     {
-      cp_error (ec_member_cannot_be_declared_both_virtual_and_static,
+      cp_error ("member `%D' cannot be declared both virtual and static",
                dname);
       staticp = 0;
     }
@@ -9056,12 +9066,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
     {
       if (decl_context == PARM)
        {
-         cp_error (ec_nonmember_s_cannot_be_declared_mutable, name);
+         error ("non-member `%s' cannot be declared `mutable'", name);
          RIDBIT_RESET (RID_MUTABLE, specbits);
        }
       else if (friendp || decl_context == TYPENAME)
        {
-         cp_error (ec_nonobject_member_s_cannot_be_declared_mutable, name);
+         error ("non-object member `%s' cannot be declared `mutable'", name);
          RIDBIT_RESET (RID_MUTABLE, specbits);
        }
     }
@@ -9073,11 +9083,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
       if (RIDBIT_SETP (RID_STATIC, specbits)) nclasses++;
       if (RIDBIT_SETP (RID_EXTERN, specbits)) nclasses++;
       if (decl_context == PARM && nclasses > 0)
-       cp_error (ec_storage_class_specifiers_invalid_in_parameter_declarations);
+       error ("storage class specifiers invalid in parameter declarations");
       if (RIDBIT_SETP (RID_TYPEDEF, specbits))
        {
          if (decl_context == PARM)
-           cp_error (ec_typedef_declaration_invalid_in_parameter_declaration);
+           error ("typedef declaration invalid in parameter declaration");
          nclasses++;
        }
       if (RIDBIT_SETP (RID_AUTO, specbits)) nclasses++;
@@ -9088,12 +9098,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
   if (virtualp
       && (current_class_name == NULL_TREE || decl_context != FIELD))
     {
-      cp_error (ec_virtual_outside_class_declaration);
+      error ("virtual outside class declaration");
       virtualp = 0;
     }
   if (current_class_name == NULL_TREE && RIDBIT_SETP (RID_MUTABLE, specbits))
     {
-      cp_error (ec_only_members_can_be_declared_mutable);
+      error ("only members can be declared mutable");
       RIDBIT_RESET (RID_MUTABLE, specbits);
     }
 
@@ -9111,29 +9121,29 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
     {
       if (constp)
        {
-         cp_error (ec_const_specified_for_signature_member_function_s, name);
+         error ("`const' specified for signature member function `%s'", name);
          constp = 0;
        }
       if (volatilep)
        {
-         cp_error (ec_volatile_specified_for_signature_member_function_s,
+         error ("`volatile' specified for signature member function `%s'",
                 name);
          volatilep = 0;
        }
       if (inlinep)
        {
-         cp_error (ec_inline_specified_for_signature_member_function_s, name);
+         error ("`inline' specified for signature member function `%s'", name);
          /* Later, we'll make signature member functions inline.  */
          inlinep = 0;
        }
       if (friendp)
        {
-         cp_error (ec_friend_declaration_in_signature_definition);
+         error ("`friend' declaration in signature definition");
          friendp = 0;
        }
       if (virtualp)
        {
-         cp_error (ec_virtual_specified_for_signature_member_function_s,
+         error ("`virtual' specified for signature member function `%s'",
                 name);
          /* Later, we'll make signature member functions virtual.  */
          virtualp = 0;
@@ -9144,7 +9154,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
      kinds of declarations (parameters, typenames, etc.).  */
 
   if (nclasses > 1)
-    cp_error (ec_multiple_storage_classes_in_declaration_of_s, name);
+    error ("multiple storage classes in declaration of `%s'", name);
   else if (decl_context != NORMAL && nclasses > 0)
     {
       if ((decl_context == PARM || decl_context == CATCHPARM)
@@ -9176,7 +9186,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                    tmp = TREE_OPERAND (declarator, 0);
                  op = IDENTIFIER_OPNAME_P (tmp);
                }
-             cp_error (ec_storage_class_specified_for_s_s,
+             error ("storage class specified for %s `%s'",
                     IS_SIGNATURE (current_class_type)
                     ? (op
                        ? "signature member operator"
@@ -9206,22 +9216,22 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          /* It's common practice (and completely valid) to have a const
             be initialized and declared extern.  */
          if (! constp)
-           cp_warning (ec_s_initialized_and_declared_extern, name);
+           warning ("`%s' initialized and declared `extern'", name);
        }
       else
-       cp_error (ec_s_has_both_extern_and_initializer, name);
+       error ("`%s' has both `extern' and initializer", name);
     }
   else if (RIDBIT_SETP (RID_EXTERN, specbits) && funcdef_flag
           && ! toplevel_bindings_p ())
-    cp_error (ec_nested_function_s_declared_extern, name);
+    error ("nested function `%s' declared `extern'", name);
   else if (toplevel_bindings_p ())
     {
       if (RIDBIT_SETP (RID_AUTO, specbits))
-       cp_error (ec_toplevel_declaration_of_s_specifies_auto, name);
+       error ("top-level declaration of `%s' specifies `auto'", name);
     }
 
   if (nclasses > 0 && friendp)
-    cp_error (ec_storage_class_specifiers_invalid_in_friend_function_declarations);
+    error ("storage class specifiers invalid in friend function declarations");
 
   /* Now figure out the structure of the declarator proper.
      Descend through it, creating more complex types, until we reach
@@ -9288,13 +9298,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
            if (TREE_CODE (type) == VOID_TYPE)
              {
-               cp_error (ec_declaration_of_as_array_of_voids, dname);
+               cp_error ("declaration of `%D' as array of voids", dname);
                type = error_mark_node;
              }
 
            if (TREE_CODE (type) == FUNCTION_TYPE)
              {
-               cp_error (ec_declaration_of_as_array_of_functions, dname);
+               cp_error ("declaration of `%D' as array of functions", dname);
                type = error_mark_node;
              }
 
@@ -9305,23 +9315,23 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            if (TREE_CODE (type) == REFERENCE_TYPE)
              {
                if (decl_context == TYPENAME)
-                 cp_error (ec_cannot_make_arrays_of_references);
+                 cp_error ("cannot make arrays of references");
                else
-                 cp_error (ec_declaration_of_as_array_of_references,
+                 cp_error ("declaration of `%D' as array of references",
                            dname);
                type = error_mark_node;
              }
 
            if (TREE_CODE (type) == OFFSET_TYPE)
              {
-                 cp_error (ec_declaration_of_as_array_of_data_members,
+                 cp_error ("declaration of `%D' as array of data members",
                            dname);
                type = error_mark_node;
              }
 
            if (TREE_CODE (type) == METHOD_TYPE)
              {
-               cp_error (ec_declaration_of_as_array_of_function_members,
+               cp_error ("declaration of `%D' as array of function members",
                          dname);
                type = error_mark_node;
              }
@@ -9360,14 +9370,14 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                if (TREE_CODE (TREE_TYPE (size)) != INTEGER_TYPE
                    && TREE_CODE (TREE_TYPE (size)) != ENUMERAL_TYPE)
                  {
-                   cp_error (ec_size_of_array_has_noninteger_type,
+                   cp_error ("size of array `%D' has non-integer type",
                              dname);
                    size = integer_one_node;
                  }
                if (TREE_READONLY_DECL_P (size))
                  size = decl_constant_value (size);
                if (pedantic && integer_zerop (size))
-                 cp_pedwarn (ec_forbids_zerosize_array, dname);
+                 cp_pedwarn ("ANSI C++ forbids zero-size array `%D'", dname);
                if (TREE_CONSTANT (size))
                  {
                    int old_flag_pedantic_errors = flag_pedantic_errors;
@@ -9379,7 +9389,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                    flag_pedantic_errors = old_flag_pedantic_errors;
                    if (INT_CST_LT (size, integer_zero_node))
                      {
-                       cp_error (ec_size_of_array_is_negative, dname);
+                       cp_error ("size of array `%D' is negative", dname);
                        size = integer_one_node;
                      }
                  }
@@ -9388,10 +9398,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                    if (pedantic)
                      {
                        if (dname)
-                         cp_pedwarn (ec_forbids_variablesize_array_name,
+                         cp_pedwarn ("ANSI C++ forbids variable-size array `%D'",
                                      dname);
                        else
-                         cp_pedwarn (ec_forbids_variablesize_array);
+                         cp_pedwarn ("ANSI C++ forbids variable-size array");
                      }
                  }
 
@@ -9404,7 +9414,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                  itype = variable_size (itype);
                else if (TREE_OVERFLOW (itype))
                  {
-                   cp_error (ec_overflow_in_array_dimension);
+                   error ("overflow in array dimension");
                    TREE_OVERFLOW (itype) = 0;
                  }
 
@@ -9451,7 +9461,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 #if 0
            /* Is this an error?  Should they be merged into TYPE here?  */
            if (pedantic && (constp || volatilep))
-             cp_pedwarn (ec_function_declared_to_return_const_or_volatile_result);
+             pedwarn ("function declared to return const or volatile result");
 #else
            /* Merge any constancy or volatility into the function return
                type.  */
@@ -9470,12 +9480,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
            if (TREE_CODE (type) == FUNCTION_TYPE)
              {
-               cp_error (ec_s_declared_as_function_returning_a_function, name);
+               error ("`%s' declared as function returning a function", name);
                type = integer_type_node;
              }
            if (TREE_CODE (type) == ARRAY_TYPE)
              {
-               cp_error (ec_s_declared_as_function_returning_an_array, name);
+               error ("`%s' declared as function returning an array", name);
                type = integer_type_node;
              }
 
@@ -9520,10 +9530,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                       not be declared const or volatile.  A destructor
                       may not be static.  */
                    if (staticp == 2)
-                     cp_error (ec_destructor_cannot_be_static_member_function);
+                     error ("destructor cannot be static member function");
                    if (quals)
                      {
-                       cp_error (ec_destructors_cannot_be_declared_const_or_volatile);
+                       error ("destructors cannot be declared `const' or `volatile'");
                        return void_type_node;
                      }
                    if (decl_context == FIELD)
@@ -9541,15 +9551,15 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                       not be declared const or volatile.  A constructor may
                       not be virtual.  A constructor may not be static.  */
                    if (staticp == 2)
-                     cp_error (ec_constructor_cannot_be_static_member_function);
+                     error ("constructor cannot be static member function");
                    if (virtualp)
                      {
-                       cp_pedwarn (ec_constructors_cannot_be_declared_virtual);
+                       pedwarn ("constructors cannot be declared virtual");
                        virtualp = 0;
                      }
                    if (quals)
                      {
-                       cp_error (ec_constructors_cannot_be_declared_const_or_volatile);
+                       error ("constructors cannot be declared `const' or `volatile'");
                        return void_type_node;
                      }
                    {
@@ -9558,13 +9568,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                      RIDBIT_RESET (RID_INLINE, tmp_bits);
                      RIDBIT_RESET (RID_STATIC, tmp_bits);
                      if (RIDBIT_ANY_SET (tmp_bits))
-                       cp_error (ec_return_value_type_specifier_for_constructor_ignored);
+                       error ("return value type specifier for constructor ignored");
                    }
                    type = build_pointer_type (ctype);
                    if (decl_context == FIELD
                        && IS_SIGNATURE (current_class_type))
                      {
-                       cp_error (ec_constructor_not_allowed_in_signature);
+                       error ("constructor not allowed in signature");
                        return void_type_node;
                      }                   
                    else if (decl_context == FIELD)
@@ -9583,18 +9593,18 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            else if (friendp)
              {
                if (initialized)
-                 cp_error (ec_cant_initialize_friend_function_s, name);
+                 error ("can't initialize friend function `%s'", name);
                if (virtualp)
                  {
                    /* Cannot be both friend and virtual.  */
-                   cp_error (ec_virtual_functions_cannot_be_friends);
+                   error ("virtual functions cannot be friends");
                    RIDBIT_RESET (RID_FRIEND, specbits);
                    friendp = 0;
                  }
                if (decl_context == NORMAL)
-                 cp_error (ec_friend_declaration_not_in_class_definition);
+                 error ("friend declaration not in class definition");
                if (current_function_decl && funcdef_flag)
-                 cp_error (ec_cant_define_friend_function_s_in_a_local_class_definition,
+                 cp_error ("can't define friend function `%s' in a local class definition",
                            name);
              }
 
@@ -9623,7 +9633,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                    else if (arg_types == NULL_TREE
                             || arg_types != void_list_node)
                      {
-                       cp_error (ec_destructors_cannot_be_specified_with_parameters);
+                       error ("destructors cannot be specified with parameters");
                        arg_types = void_list_node;
                      }
                  }
@@ -9653,7 +9663,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
          if (TREE_CODE (type) == REFERENCE_TYPE)
            {
-             cp_error (ec_cannot_declare_s_to_references,
+             error ("cannot declare %s to references",
                     TREE_CODE (declarator) == ADDR_EXPR
                     ? "references" : "pointers");
              declarator = TREE_OPERAND (declarator, 0);
@@ -9664,7 +9674,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              && (TREE_CODE (TREE_TYPE (type)) == VOID_TYPE
                  || TREE_CODE (TREE_TYPE (type)) == REFERENCE_TYPE))
            {
-             cp_error (ec_cannot_declare_pointer_to_member,
+             cp_error ("cannot declare pointer to `%#T' member",
                        TREE_TYPE (type));
              type = TREE_TYPE (type);
            }
@@ -9694,7 +9704,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                {
                  if (CLASSTYPE_METHOD_VEC (type) == NULL_TREE
                      && TYPE_SIZE (type))
-                   cp_warning (ec_empty_signature_used_in_signature_reference_declaration,
+                   cp_warning ("empty signature `%T' used in signature reference declaration",
                                type);
 #if 0
                  type = build_signature_reference_type (type,
@@ -9708,7 +9718,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                {
                  if (CLASSTYPE_METHOD_VEC (type) == NULL_TREE
                      && TYPE_SIZE (type))
-                   cp_warning (ec_empty_signature_used_in_signature_pointer_declaration,
+                   cp_warning ("empty signature `%T' used in signature pointer declaration",
                                type);
                  type = build_signature_pointer_type (type,
                                                       constp, volatilep);
@@ -9720,13 +9730,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            {
              if (TREE_CODE (type) == FUNCTION_TYPE)
                {
-                 cp_error (ec_cannot_declare_references_to_functions_use_pointer_to_function_instead);
+                 error ("cannot declare references to functions; use pointer to function instead");
                  type = build_pointer_type (type);
                }
              else
                {
                  if (TREE_CODE (type) == VOID_TYPE)
-                   cp_error (ec_invalid_type_void);
+                   error ("invalid type: `void &'");
                  else
                    type = build_reference_type (type);
                }
@@ -9755,22 +9765,22 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                  else if (!erred)
                    {
                      erred = 1;
-                     cp_error (ec_invalid_type_modifier_within_s_declarator,
+                     error ("invalid type modifier within %s declarator",
                             TREE_CODE (declarator) == ADDR_EXPR
                             ? "reference" : "pointer");
                    }
                }
              if (constp > 1)
-               cp_pedwarn (ec_duplicate_const);
+               pedwarn ("duplicate `const'");
              if (volatilep > 1)
-               cp_pedwarn (ec_duplicate_volatile);
+               pedwarn ("duplicate `volatile'");
              if (TREE_CODE (declarator) == ADDR_EXPR
                  && (constp || volatilep))
                {
                  if (constp)
-                   cp_pedwarn (ec_discarding_const_applied_to_a_reference);
+                   pedwarn ("discarding `const' applied to a reference");
                  if (volatilep)
-                   cp_pedwarn (ec_discarding_volatile_applied_to_a_reference);
+                   pedwarn ("discarding `volatile' applied to a reference");
                  constp = volatilep = 0;
                }
            }
@@ -9870,7 +9880,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                       Is this ill-formed?  */
 
                    if (pedantic)
-                     cp_pedwarn (ec_extra_qualification_on_member_s_ignored,
+                     cp_pedwarn ("extra qualification `%T::' on member `%s' ignored",
                                  ctype, name);
                  }
                else if (TREE_CODE (type) == FUNCTION_TYPE)
@@ -9881,7 +9891,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                                                      TREE_TYPE (type), TYPE_ARG_TYPES (type));
                    else
                      {
-                       cp_error (ec_cannot_declare_member_function_s_within,
+                       cp_error ("cannot declare member function `%T::%s' within `%T'",
                                  ctype, name, current_class_type);
                        return void_type_node;
                      }
@@ -9896,7 +9906,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
                    if (current_class_type)
                      {
-                       cp_error (ec_cannot_declare_member_s_within,
+                       cp_error ("cannot declare member `%T::%s' within `%T'",
                                  ctype, name, current_class_type);
                        return void_type_node;
                      }
@@ -9914,7 +9924,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                  }
                else
                  {
-                   cp_error (ec_structure_not_yet_defined, ctype);
+                   cp_error ("structure `%T' not yet defined", ctype);
                    return error_mark_node;
                  }
 
@@ -9961,7 +9971,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
   if (explicitp == 1)
     {
-      cp_error (ec_only_constructors_can_be_declared_explicit);
+      error ("only constructors can be declared `explicit'");
       explicitp = 0;
     }
 
@@ -9973,12 +9983,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
     {
       if (constp)
        {
-         cp_error (ec_const_s_cannot_be_declared_mutable, name);
+         error ("const `%s' cannot be declared `mutable'", name);
          RIDBIT_RESET (RID_MUTABLE, specbits);
        }
       else if (staticp)
        {
-         cp_error (ec_static_s_cannot_be_declared_mutable, name);
+         error ("static `%s' cannot be declared `mutable'", name);
          RIDBIT_RESET (RID_MUTABLE, specbits);
        }
     }
@@ -9997,7 +10007,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
       if (decl_context == FIELD)
        {
          if (declarator == current_class_name)
-           cp_pedwarn (ec_forbids_nested_type_with_same_name_as_enclosing_class,
+           cp_pedwarn ("ANSI C++ forbids nested type `%D' with same name as enclosing class",
                        declarator);
          decl = build_lang_decl (TYPE_DECL, declarator, type);
          if (IS_SIGNATURE (current_class_type) && opaque_typedef)
@@ -10056,7 +10066,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
       if (TREE_CODE (type) == OFFSET_TYPE || TREE_CODE (type) == METHOD_TYPE)
        {
-         cp_error_at (ec_typedef_name_may_not_be_classqualified, decl);
+         cp_error_at ("typedef name may not be class-qualified", decl);
          return NULL_TREE;
        }
       else if (quals)
@@ -10064,7 +10074,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          if (ctype == NULL_TREE)
            {
              if (TREE_CODE (type) != METHOD_TYPE)
-               cp_error_at (ec_invalid_type_qualifier_for_nonmethod_type, decl);
+               cp_error_at ("invalid type qualifier for non-method type", decl);
              else
                ctype = TYPE_METHOD_BASETYPE (type);
            }
@@ -10078,14 +10088,14 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
       if (RIDBIT_SETP (RID_MUTABLE, specbits))
        {
-         cp_error (ec_nonobject_member_s_cannot_be_declared_mutable, name);
+         error ("non-object member `%s' cannot be declared mutable", name);
        }
 
       bad_specifiers (decl, "type", virtualp, quals != NULL_TREE,
                      inlinep, friendp, raises != NULL_TREE);
 
       if (initialized)
-       cp_error (ec_typedef_declaration_includes_an_initializer);
+       error ("typedef declaration includes an initializer");
 
       return decl;
     }
@@ -10112,7 +10122,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
       if (constp || volatilep)
        {
          if (IS_SIGNATURE (type))
-           cp_error (ec_const_or_volatile_specified_with_signature_type);
+           error ("`const' or `volatile' specified with signature type");
          else  
            type = cp_build_type_variant (type, constp, volatilep);
        }
@@ -10122,12 +10132,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
        {
          if (volatilep)
            {
-             cp_error (ec_volatile_specified_for_friend_class_declaration);
+             cp_error ("`volatile' specified for friend class declaration");
              volatilep = 0;
            }
          if (inlinep)
            {
-             cp_error (ec_inline_specified_for_friend_class_declaration);
+             cp_error ("`inline' specified for friend class declaration");
              inlinep = 0;
            }
 
@@ -10138,7 +10148,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              if (current_class_type)
                make_friend_class (current_class_type, TYPE_MAIN_VARIANT (type));
              else
-               cp_error (ec_trying_to_make_class_s_a_friend_of_global_scope,
+               error ("trying to make class `%s' a friend of global scope",
                       TYPE_NAME_STRING (type));
              type = void_type_node;
            }
@@ -10162,7 +10172,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
           && TREE_CODE (type) != UNION_TYPE
           && ! bitfield)
     {
-      cp_error (ec_abstract_declarator_type_used_as_declaration, type);
+      cp_error ("abstract declarator `%T' used as declaration", type);
       declarator = make_anon_name ();
     }
 
@@ -10174,16 +10184,16 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
   if (TREE_CODE (type) == VOID_TYPE && decl_context != PARM)
     {
       if (! declarator)
-       cp_error (ec_unnamed_variable_or_field_declared_void);
+       error ("unnamed variable or field declared void");
       else if (TREE_CODE (declarator) == IDENTIFIER_NODE)
        {
          if (IDENTIFIER_OPNAME_P (declarator))
            my_friendly_abort (356);
          else
-           cp_error (ec_variable_or_field_s_declared_void, name);
+           error ("variable or field `%s' declared void", name);
        }
       else
-       cp_error (ec_variable_or_field_declared_void);
+       error ("variable or field declared void");
       type = integer_type_node;
     }
 
@@ -10196,7 +10206,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
     if (decl_context == PARM)
       {
        if (ctype || in_namespace)
-         cp_error (ec_cannot_use_in_parameter_declaration);
+         error ("cannot use `::' in parameter declaration");
 
        /* A parameter declared as an array of T is really a pointer to T.
           One declared as a function is really a pointer to a function.
@@ -10215,7 +10225,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          type = build_pointer_type (type);
        else if (TREE_CODE (type) == VOID_TYPE && declarator)
          {
-           cp_error (ec_declaration_of_s_as_void, name);
+           error ("declaration of `%s' as void", name);
            return NULL_TREE;
          }
 
@@ -10227,11 +10237,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            && IS_SIGNATURE (current_class_type))
          {
            if (inlinep)
-             cp_error (ec_parameter_of_signature_member_function_declared_inline);
+             error ("parameter of signature member function declared `inline'");
            if (RIDBIT_SETP (RID_AUTO, specbits))
-             cp_error (ec_parameter_of_signature_member_function_declared_auto);
+             error ("parameter of signature member function declared `auto'");
            if (RIDBIT_SETP (RID_REGISTER, specbits))
-             cp_error (ec_parameter_of_signature_member_function_declared_register);
+             error ("parameter of signature member function declared `register'");
          }
 
        /* Compute the type actually passed in the parmlist,
@@ -10252,7 +10262,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
        else if (in_namespace)
          {
            /* Something like struct S { int N::j; };  */
-           cp_error (ec_invalid_use_of_scope);
+           cp_error ("invalid use of `::'");
            decl = NULL_TREE;
          }
        else if (TREE_CODE (type) == FUNCTION_TYPE)
@@ -10264,7 +10274,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
               typedefs.  */
            if (friendp && declarator == ridpointers[(int) RID_SIGNED])
              {
-               cp_error (ec_function_cannot_be_declared_friend,
+               cp_error ("function `%D' cannot be declared friend",
                          declarator);
                friendp = 0;
              }
@@ -10276,7 +10286,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
                if (ctype == NULL_TREE)
                  {
-                   cp_error (ec_cant_make_into_a_method_not_in_a_class,
+                   cp_error ("can't make `%D' into a method -- not in a class",
                              declarator);
                    return void_type_node;
                  }
@@ -10285,7 +10295,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                   ARM 9.5 */
                if (virtualp && TREE_CODE (ctype) == UNION_TYPE)
                  {
-                   cp_error (ec_function_declared_virtual_inside_a_union,
+                   cp_error ("function `%D' declared virtual inside a union",
                              declarator);
                    return void_type_node;
                  }
@@ -10297,7 +10307,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                  {
                    if (virtualp)
                      {
-                       cp_error (ec_cannot_be_declared_virtual_since_it_is_always_static,
+                       cp_error ("`%D' cannot be declared virtual, since it is always static",
                                  declarator);
                        virtualp = 0;
                      }
@@ -10348,9 +10358,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                 && (TREE_CODE (type) != ARRAY_TYPE || initialized == 0))
          {
            if (declarator)
-             cp_error (ec_field_has_incomplete_type, declarator);
+             cp_error ("field `%D' has incomplete type", declarator);
            else
-             cp_error (ec_name_has_incomplete_type, type);
+             cp_error ("name `%T' has incomplete type", type);
 
            /* If we're instantiating a template, tell them which
               instantiation made the field's type be incomplete.  */
@@ -10359,7 +10369,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                && IDENTIFIER_TEMPLATE (TYPE_IDENTIFIER (current_class_type))
                && declspecs && TREE_VALUE (declspecs)
                && TREE_TYPE (TREE_VALUE (declspecs)) == type)
-             cp_error (ec_in_instantiation_of_template,
+             cp_error ("  in instantiation of template `%T'",
                        current_class_type);
 
            type = error_mark_node;
@@ -10369,7 +10379,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          {
            if (friendp)
              {
-               cp_error (ec_s_is_neither_function_nor_method_cannot_be_declared_friend,
+               error ("`%s' is neither function nor method; cannot be declared friend",
                       IDENTIFIER_POINTER (declarator));
                friendp = 0;
              }
@@ -10380,7 +10390,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          {
            /* Friends are treated specially.  */
            if (ctype == current_class_type)
-             cp_warning (ec_member_functions_are_implicitly_friends_of_their_class);
+             warning ("member functions are implicitly friends of their class");
            else
              {
                tree t = NULL_TREE;
@@ -10427,10 +10437,10 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                       the rest of the compiler does not correctly
                       handle the initialization unless the member is
                       static so we make it static below.  */
-                   cp_pedwarn (ec_forbids_initialization_of_s,
+                   cp_pedwarn ("ANSI C++ forbids initialization of %s `%D'",
                                constp ? "const member" : "member", 
                                declarator);
-                   cp_pedwarn (ec_making_static, declarator);
+                   cp_pedwarn ("making `%D' static", declarator);
                    staticp = 1;
                  }
 
@@ -10444,7 +10454,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                if (CLASS_TYPE_P (type)
                    || TREE_CODE (type) == REFERENCE_TYPE)
                  {
-                   cp_error (ec_inclass_initialization_of_static_data_member_of_nonintegral_type
+                   cp_error ("in-class initialization of static data member of non-integral type `%T'"
                              type);
                    /* If we just return the declaration, crashes will
                       sometimes occur.  We therefore return
@@ -10454,18 +10464,18 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
                    return void_type_node;
                  }
                else if (!constp)
-                 cp_error (ec_forbids_inclass_initialization_of_nonconst_static_member,
+                 cp_error ("ANSI C++ forbids in-class initialization of non-const static member `%D'",
                            declarator);
                else if (pedantic && ! INTEGRAL_TYPE_P (type) 
                         && !uses_template_parms (type))
-                 cp_pedwarn (ec_forbids_initialization_of_member_constant_of_nonintegral_type, declarator, type);
+                 cp_pedwarn ("ANSI C++ forbids initialization of member constant `%D' of non-integral type `%T'", declarator, type);
              }
 
            if (staticp)
              {
                /* ANSI C++ Apr '95 wp 9.2 */
                if (declarator == current_class_name)
-                 cp_pedwarn (ec_forbids_static_member_with_same_name_as_enclosing_class,
+                 cp_pedwarn ("ANSI C++ forbids static member `%D' with same name as enclosing class",
                              declarator);
 
                /* C++ allows static class members.
@@ -10505,9 +10515,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
          original_name = declarator;
 
        if (RIDBIT_SETP (RID_AUTO, specbits))
-         cp_error (ec_storage_class_auto_invalid_for_function_s, name);
+         error ("storage class `auto' invalid for function `%s'", name);
        else if (RIDBIT_SETP (RID_REGISTER, specbits))
-         cp_error (ec_storage_class_register_invalid_for_function_s, name);
+         error ("storage class `register' invalid for function `%s'", name);
 
        /* Function declaration not at top level.
           Storage classes other than `extern' are not allowed
@@ -10518,16 +10528,16 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            && pedantic)
          {
            if (RIDBIT_SETP (RID_STATIC, specbits))
-             cp_pedwarn (ec_storage_class_static_invalid_for_function_s_declared_out_of_global_scope, name);
+             pedwarn ("storage class `static' invalid for function `%s' declared out of global scope", name);
            else
-             cp_pedwarn (ec_storage_class_inline_invalid_for_function_s_declared_out_of_global_scope, name);
+             pedwarn ("storage class `inline' invalid for function `%s' declared out of global scope", name);
          }
        
        if (ctype == NULL_TREE)
          {
            if (virtualp)
              {
-               cp_error (ec_virtual_nonclass_function_s, name);
+               error ("virtual non-class function `%s'", name);
                virtualp = 0;
              }
 
@@ -10578,13 +10588,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
               declaring main to be static.  */
            if (TREE_CODE (type) == METHOD_TYPE)
              {
-               cp_pedwarn (ec_cannot_declare_member_function_to_have_static_linkage, decl);
+               cp_pedwarn ("cannot declare member function `%D' to have static linkage", decl);
                illegal_static = 1;
              }
            else if (current_function_decl)
              {
                /* FIXME need arm citation */
-               cp_error (ec_cannot_declare_static_function_inside_another_function);
+               error ("cannot declare static function inside another function");
                illegal_static = 1;
              }
 
@@ -10604,7 +10614,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            if (ctype)
              {
                ctype = NULL_TREE;
-               cp_error (ec_cannot_use_in_parameter_declaration);
+               error ("cannot use `::' in parameter declaration");
              }
 
            /* A parameter declared as an array of T is really a pointer to T.
@@ -10636,18 +10646,18 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
            DECL_CONTEXT (decl) = ctype;
            if (staticp == 1)
              {
-               cp_pedwarn (ec_static_member_redeclared_as_static, decl);
+               cp_pedwarn ("static member `%D' re-declared as static", decl);
                staticp = 0;
                RIDBIT_RESET (RID_STATIC, specbits);
              }
            if (RIDBIT_SETP (RID_REGISTER, specbits) && TREE_STATIC (decl))
              {
-               cp_error (ec_static_member_declared_register, decl);
+               cp_error ("static member `%D' declared `register'", decl);
                RIDBIT_RESET (RID_REGISTER, specbits);
              }
            if (RIDBIT_SETP (RID_EXTERN, specbits) && pedantic)
              {
-               cp_pedwarn (ec_cannot_explicitly_declare_member_to_have_extern_linkage,
+               cp_pedwarn ("cannot explicitly declare member `%#D' to have extern linkage",
                            decl);
                RIDBIT_RESET (RID_EXTERN, specbits);
              }
@@ -10656,7 +10666,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
 
     if (RIDBIT_SETP (RID_MUTABLE, specbits))
       {
-       cp_error (ec_s_cannot_be_declared_mutable, name);
+       error ("`%s' cannot be declared mutable", name);
       }
 
     /* Record `register' declaration for warnings on &
@@ -10730,10 +10740,10 @@ require_complete_types_for_parms (parms)
       if (TYPE_SIZE (complete_type (type)) == NULL_TREE)
        {
          if (DECL_NAME (parms))
-           cp_error (ec_parameter_s_has_incomplete_type,
+           error ("parameter `%s' has incomplete type",
                   IDENTIFIER_POINTER (DECL_NAME (parms)));
          else
-           cp_error (ec_parameter_has_incomplete_type);
+           error ("parameter has incomplete type");
          TREE_TYPE (parms) = error_mark_node;
        }
 #if 0
@@ -10754,10 +10764,10 @@ require_complete_types_for_parms (parms)
          if (TYPE_SIZE (type) == NULL_TREE)
            {
              if (DECL_NAME (parm) != NULL_TREE)
-               cp_warning (ec_parameter_s_points_to_incomplete_type,
+               warning ("parameter `%s' points to incomplete type",
                         IDENTIFIER_POINTER (DECL_NAME (parm)));
              else
-               cp_warning (ec_parameter_points_to_incomplete_type);
+               warning ("parameter points to incomplete type");
            }
        }
 #endif
@@ -10812,7 +10822,7 @@ grokparms (first_parm, funcdef_flag)
       && TREE_CODE (TREE_VALUE (first_parm)) == IDENTIFIER_NODE)
     {
       if (! funcdef_flag)
-       cp_pedwarn (ec_parameter_names_without_types_in_function_declaration);
+       pedwarn ("parameter names (without types) in function declaration");
       last_function_parms = first_parm;
       return NULL_TREE;
     }
@@ -10845,9 +10855,9 @@ grokparms (first_parm, funcdef_flag)
                {
                  /* Give various messages as the need arises.  */
                  if (TREE_CODE (decl) == STRING_CST)
-                   cp_error (ec_invalid_string_constant, decl);
+                   cp_error ("invalid string constant `%E'", decl);
                  else if (TREE_CODE (decl) == INTEGER_CST)
-                   cp_error (ec_invalid_integer_constant_in_parameter_list_did_you_forget_to_give_parameter_name);
+                   error ("invalid integer constant in parameter list, did you forget to give parameter name?");
                  continue;
                }
 
@@ -10867,20 +10877,20 @@ grokparms (first_parm, funcdef_flag)
                      if (DECL_NAME (decl))
                        /* Cannot use the decl here because
                           we don't have DECL_CONTEXT set up yet.  */
-                       cp_error (ec_parameter_invalidly_declared_method_type,
+                       cp_error ("parameter `%D' invalidly declared method type",
                                  DECL_NAME (decl));
                      else
-                       cp_error (ec_parameter_invalidly_declared_method_type);
+                       error ("parameter invalidly declared method type");
                      type = build_pointer_type (type);
                      TREE_TYPE (decl) = type;
                    }
                  else if (TREE_CODE (type) == OFFSET_TYPE)
                    {
                      if (DECL_NAME (decl))
-                       cp_error (ec_parameter_invalidly_declared_offset_type,
+                       cp_error ("parameter `%D' invalidly declared offset type",
                                  DECL_NAME (decl));
                      else
-                       cp_error (ec_parameter_invalidly_declared_offset_type);
+                       error ("parameter invalidly declared offset type");
                      type = build_pointer_type (type);
                      TREE_TYPE (decl) = type;
                    }
@@ -10906,7 +10916,7 @@ grokparms (first_parm, funcdef_flag)
                                 && TYPE_DOMAIN (t) != NULL_TREE))
                        t = TREE_TYPE (t);
                      if (TREE_CODE (t) == ARRAY_TYPE)
-                       cp_error (ec_parameter_type_includes_pointer_to_array_of_unknown_bound,
+                       cp_error ("parameter type `%T' includes pointer to array of unknown bound",
                                  type);
                    }
                }
@@ -10925,7 +10935,7 @@ grokparms (first_parm, funcdef_flag)
                    }
                  if (chain
                      && (chain != void_list_node || TREE_CHAIN (chain)))
-                   cp_error (ec_void_in_parameter_list_must_be_entire_list);
+                   error ("`void' in parameter list must be entire list");
                  break;
                }
 
@@ -10959,7 +10969,7 @@ grokparms (first_parm, funcdef_flag)
                              /* If extern int i; within a function is not
                                 considered a local variable, then this code is
                                 wrong.  */
-                             cp_error (ec_local_variable_may_not_be_used_as_a_default_argument, init);
+                             cp_error ("local variable `%D' may not be used as a default argument", init);
                              any_error = 1;
                            }
                          else if (TREE_READONLY_DECL_P (init))
@@ -10971,7 +10981,7 @@ grokparms (first_parm, funcdef_flag)
                          && init != error_mark_node
                          && TREE_CODE (init) != DEFAULT_ARG
                          && ! can_convert_arg (type, TREE_TYPE (init), init))
-                       cp_pedwarn (ec_invalid_type_for_default_argument_to_decl,
+                       cp_pedwarn ("invalid type `%T' for default argument to `%#D'",
                                    TREE_TYPE (init), decl);
                    }
                }
@@ -11035,7 +11045,7 @@ replace_defarg (arg, init)
 {
   if (! processing_template_decl
       && ! can_convert_arg (TREE_VALUE (arg), TREE_TYPE (init), init))
-    cp_pedwarn (ec_invalid_type_for_default_argument_to,
+    cp_pedwarn ("invalid type `%T' for default argument to `%T'",
                TREE_TYPE (init), TREE_VALUE (arg));
   TREE_PURPOSE (arg) = init;
 }
@@ -11100,7 +11110,7 @@ grok_ctor_properties (ctype, decl)
           && TREE_CHAIN (parmtypes) != NULL_TREE
           && TREE_CHAIN (parmtypes) == void_list_node)
     {
-      cp_error (ec_invalid_constructor_you_probably_meant_const,
+      cp_error ("invalid constructor; you probably meant `%T (const %T&)'",
                ctype, ctype);
       SET_IDENTIFIER_ERROR_LOCUS (DECL_NAME (decl), ctype);
       return 0;
@@ -11223,13 +11233,13 @@ grok_op_properties (decl, virtualp, friendp)
              || name == ansi_opname[(int) MODIFY_EXPR]
              || name == ansi_opname[(int) COMPONENT_REF]
              || name == ansi_opname[(int) ARRAY_REF])
-           cp_error (ec_must_be_a_nonstatic_member_function, decl);
+           cp_error ("`%D' must be a nonstatic member function", decl);
          else
            {
              tree p = argtypes;
 
              if (DECL_STATIC_FUNCTION_P (decl))
-               cp_error (ec_must_be_either_a_nonstatic_member_function_or_a_nonmember_function, decl);
+               cp_error ("`%D' must be either a non-static member function or a non-member function", decl);
 
              if (p)
                for (; TREE_CODE (TREE_VALUE (p)) != VOID_TYPE ; p = TREE_CHAIN (p))
@@ -11245,7 +11255,8 @@ grok_op_properties (decl, virtualp, friendp)
                        || TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM)
                      goto foundaggr;
                  }
-             cp_error (ec_must_have_an_argument_of_class_or_enumerated_type,
+             cp_error
+               ("`%D' must have an argument of class or enumerated type",
                 decl);
            foundaggr:
              ;
@@ -11259,7 +11270,7 @@ grok_op_properties (decl, virtualp, friendp)
        {
          tree t = TREE_TYPE (name);
          if (TREE_CODE (t) == VOID_TYPE)
-           cp_pedwarn (ec_void_is_not_a_valid_type_conversion_operator);
+           pedwarn ("void is not a valid type conversion operator");
          else if (! friendp)
            {
              int ref = (TREE_CODE (t) == REFERENCE_TYPE);
@@ -11276,7 +11287,7 @@ grok_op_properties (decl, virtualp, friendp)
                what = "a base class";
 
              if (what)
-               cp_warning (ec_conversion_to_ss_will_never_use_a_type_conversion_operator,
+               warning ("conversion to %s%s will never use a type conversion operator",
                         ref ? "a reference to " : "", what);
            }
        }
@@ -11287,7 +11298,7 @@ grok_op_properties (decl, virtualp, friendp)
 
          if (list_length (argtypes) != 3 && methodp)
            {
-             cp_error (ec_must_take_exactly_one_argument, decl);
+             cp_error ("`%D' must take exactly one argument", decl);
              return;
            }
          parmtype = TREE_VALUE (TREE_CHAIN (argtypes));
@@ -11304,9 +11315,9 @@ grok_op_properties (decl, virtualp, friendp)
       else if (name == ansi_opname[(int) COND_EXPR])
        {
          /* 13.4.0.3 */
-         cp_pedwarn (ec_prohibits_overloading_operator);
+         pedwarn ("ANSI C++ prohibits overloading operator ?:");
          if (list_length (argtypes) != 4)
-           cp_error (ec_must_take_exactly_three_arguments, decl);
+           cp_error ("`%D' must take exactly three arguments", decl);
        }         
       else if (ambi_op_p (name))
        {
@@ -11320,19 +11331,20 @@ grok_op_properties (decl, virtualp, friendp)
                  && TREE_VALUE (TREE_CHAIN (argtypes)) != integer_type_node)
                {
                  if (methodp)
-                   cp_error (ec_postfix_must_take_int_as_its_argument,
+                   cp_error ("postfix `%D' must take `int' as its argument",
                              decl);
                  else
-                   cp_error (ec_postfix_must_take_int_as_its_second_argument,
-                             decl);
+                   cp_error
+                     ("postfix `%D' must take `int' as its second argument",
+                      decl);
                }
            }
          else
            {
              if (methodp)
-               cp_error (ec_must_take_either_zero_or_one_argument, decl);
+               cp_error ("`%D' must take either zero or one argument", decl);
              else
-               cp_error (ec_must_take_either_one_or_two_arguments, decl);
+               cp_error ("`%D' must take either one or two arguments", decl);
            }
 
          /* More Effective C++ rule 6.  */
@@ -11350,13 +11362,13 @@ grok_op_properties (decl, virtualp, friendp)
                  if (TREE_CODE (ret) != REFERENCE_TYPE
                      || !comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (ret)),
                                     arg, 1))
-                   cp_warning (ec_prefix_should_return, decl,
+                   cp_warning ("prefix `%D' should return `%T'", decl,
                                build_reference_type (arg));
                }
              else
                {
                  if (!comptypes (TYPE_MAIN_VARIANT (ret), arg, 1))
-                   cp_warning (ec_postfix_should_return, decl, arg);
+                   cp_warning ("postfix `%D' should return `%T'", decl, arg);
                }
            }
        }
@@ -11365,9 +11377,9 @@ grok_op_properties (decl, virtualp, friendp)
          if (list_length (argtypes) != 2)
            {
              if (methodp)
-               cp_error (ec_must_take_void, decl);
+               cp_error ("`%D' must take `void'", decl);
              else
-               cp_error (ec_must_take_exactly_one_argument, decl);
+               cp_error ("`%D' must take exactly one argument", decl);
            }
        }
       else /* if (binary_op_p (name)) */
@@ -11375,9 +11387,9 @@ grok_op_properties (decl, virtualp, friendp)
          if (list_length (argtypes) != 3)
            {
              if (methodp)
-               cp_error (ec_must_take_exactly_one_argument, decl);
+               cp_error ("`%D' must take exactly one argument", decl);
              else
-               cp_error (ec_must_take_exactly_two_arguments, decl);
+               cp_error ("`%D' must take exactly two arguments", decl);
            }
 
          /* More Effective C++ rule 7.  */
@@ -11385,7 +11397,7 @@ grok_op_properties (decl, virtualp, friendp)
              && (name == ansi_opname [TRUTH_ANDIF_EXPR]
                  || name == ansi_opname [TRUTH_ORIF_EXPR]
                  || name == ansi_opname [COMPOUND_EXPR]))
-           cp_warning (ec_userdefined_always_evaluates_both_arguments,
+           cp_warning ("user-defined `%D' always evaluates both arguments",
                        decl);
        }
 
@@ -11397,7 +11409,7 @@ grok_op_properties (decl, virtualp, friendp)
              || name == ansi_opname [TRUNC_DIV_EXPR]
              || name == ansi_opname [MULT_EXPR])
          && TREE_CODE (TREE_TYPE (TREE_TYPE (decl))) == REFERENCE_TYPE)
-       cp_warning (ec_should_return_by_value, decl);
+       cp_warning ("`%D' should return by value", decl);
 
       /* 13.4.0.8 */
       if (argtypes)
@@ -11409,10 +11421,10 @@ grok_op_properties (decl, virtualp, friendp)
                  || name == ansi_opname[(int) POSTDECREMENT_EXPR])
                {
                  if (pedantic)
-                   cp_pedwarn (ec_cannot_have_default_arguments, decl);
+                   cp_pedwarn ("`%D' cannot have default arguments", decl);
                }
              else
-               cp_error (ec_cannot_have_default_arguments, decl);
+               cp_error ("`%D' cannot have default arguments", decl);
            }
     }
 }
@@ -11488,8 +11500,8 @@ xref_tag (code_type_node, name, globalize)
       if (t && (TREE_CODE (t) == TEMPLATE_TYPE_PARM 
                            || TREE_CODE (t) == TEMPLATE_TEMPLATE_PARM))
        {
-         cp_error (ec_redeclaration_of_template_typeparameter, name);
-         cp_error_at (ec_previously_declared_here
+         cp_error ("redeclaration of template type-parameter `%T'", name);
+         cp_error_at ("  previously declared here `%#D'"
                       TEMPLATE_TYPE_DECL (t));
        }
       if (t && TYPE_CONTEXT (t) && got_type)
@@ -11575,7 +11587,7 @@ xref_tag (code_type_node, name, globalize)
 
       if (code == ENUMERAL_TYPE)
        {
-         cp_error (ec_use_of_enum_without_previous_declaration, name);
+         cp_error ("use of enum `%#D' without previous declaration", name);
 
          ref = make_node (ENUMERAL_TYPE);
 
@@ -11689,7 +11701,7 @@ xref_basetypes (code_type_node, name, ref, binfo)
 
   if (tag_code == union_type)
     {
-      cp_error (ec_derived_union_invalid, ref);
+      cp_error ("derived union `%T' invalid", ref);
       return;
     }
 
@@ -11727,7 +11739,7 @@ xref_basetypes (code_type_node, name, ref, binfo)
              && TREE_CODE (basetype) != TEMPLATE_TYPE_PARM
              && TREE_CODE (basetype) != TEMPLATE_TEMPLATE_PARM))
        {
-         cp_error (ec_base_type_fails_to_be_a_struct_or_class_type,
+         cp_error ("base type `%T' fails to be a struct or class type",
                    TREE_VALUE (binfo));
          continue;
        }
@@ -11740,7 +11752,7 @@ xref_basetypes (code_type_node, name, ref, binfo)
       if (TYPE_SIZE (complete_type (basetype)) == NULL_TREE
          && ! (current_template_parms && uses_template_parms (basetype)))
        {
-         cp_error (ec_base_class_has_incomplete_type, basetype);
+         cp_error ("base class `%T' has incomplete type", basetype);
          continue;
        }
 #endif
@@ -11749,9 +11761,9 @@ xref_basetypes (code_type_node, name, ref, binfo)
          if (CLASSTYPE_MARKED (basetype))
            {
              if (basetype == ref)
-               cp_error (ec_recursive_type_undefined, basetype);
+               cp_error ("recursive type `%T' undefined", basetype);
              else
-               cp_error (ec_duplicate_base_type_invalid, basetype);
+               cp_error ("duplicate base type `%T' invalid", basetype);
              continue;
            }
 
@@ -11850,7 +11862,7 @@ start_enum (name)
     enumtype = lookup_tag (ENUMERAL_TYPE, name, b, 1);
 
   if (enumtype != NULL_TREE && TREE_CODE (enumtype) == ENUMERAL_TYPE)
-    cp_error (ec_multiple_definition_of, enumtype);
+    cp_error ("multiple definition of `%#T'", enumtype);
   else
     {
       enumtype = make_node (ENUMERAL_TYPE);
@@ -12035,7 +12047,7 @@ build_enumerator (name, value, type)
           }
         else
           {
-            cp_error (ec_enumerator_value_for_not_integer_constant, name);
+            cp_error ("enumerator value for `%D' not integer constant", name);
             value = NULL_TREE;
           }
        }
@@ -12045,7 +12057,7 @@ build_enumerator (name, value, type)
        {
         value = enum_next_value;
         if (enum_overflow)
-          cp_error (ec_overflow_in_enumeration_values_at, name);
+          cp_error ("overflow in enumeration values at `%D'", name);
        }
 
      /* Remove no-op casts from the value.  */
@@ -12224,11 +12236,11 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
        {
          tree binding = binding_for_name (DECL_NAME (decl1), 
                                           current_namespace);
-         cp_error (ec_redeclaration_of, decl1);
+         cp_error ("redeclaration of `%#D'", decl1);
          if (IDENTIFIER_CLASS_VALUE (DECL_NAME (decl1)))
-           cp_error_at (ec_previous_declaration_here, IDENTIFIER_CLASS_VALUE (DECL_NAME (decl1)));
+           cp_error_at ("previous declaration here", IDENTIFIER_CLASS_VALUE (DECL_NAME (decl1)));
          else if (BINDING_VALUE (binding))
-           cp_error_at (ec_previous_declaration_here, BINDING_VALUE (binding));
+           cp_error_at ("previous declaration here", BINDING_VALUE (binding));
        }
 #endif
 
@@ -12279,7 +12291,7 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
       if (IS_AGGR_TYPE (restype) && ! TYPE_PTRMEMFUNC_P (restype)
          && ! CLASSTYPE_GOT_SEMICOLON (restype))
        {
-         cp_error (ec_semicolon_missing_after_declaration_of, restype);
+         cp_error ("semicolon missing after declaration of `%#T'", restype);
          shadow_tag (build_expr_list (NULL_TREE, restype));
          CLASSTYPE_GOT_SEMICOLON (restype) = 1;
          if (TREE_CODE (fntype) == FUNCTION_TYPE)
@@ -12300,7 +12312,7 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
          if (TREE_TYPE (TREE_TYPE (decl1)) != integer_type_node)
            {
              if (pedantic || warn_return_type)
-               cp_pedwarn (ec_return_type_for_main_changed_to_int);
+               pedwarn ("return type for `main' changed to `int'");
              TREE_TYPE (decl1) = fntype = default_function_type;
            }
          warn_about_return_type = 0;
@@ -12311,7 +12323,7 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
      (but not if we warned then).  */
   if (! warn_implicit
       && IDENTIFIER_IMPLICIT_DECL (DECL_NAME (decl1)) != NULL_TREE)
-    cp_warning_at (ec_implicitly_declared_before_its_definition, IDENTIFIER_IMPLICIT_DECL (DECL_NAME (decl1)));
+    cp_warning_at ("`%D' implicitly declared before its definition", IDENTIFIER_IMPLICIT_DECL (DECL_NAME (decl1)));
 
   current_function_decl = decl1;
   /* Save the parm names or decls from this function's declarator
@@ -12325,7 +12337,7 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
     {
       if (TYPE_SIZE (complete_type (TREE_TYPE (fntype))) == NULL_TREE)
        {
-         cp_error (ec_returntype_is_an_incomplete_type,
+         cp_error ("return-type `%#T' is an incomplete type",
                    TREE_TYPE (fntype));
 
          /* Make it return void instead, but don't change the
@@ -12353,13 +12365,13 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
     }
 
   if (warn_about_return_type)
-    cp_pedwarn (ec_returntype_defaults_to_int);
+    pedwarn ("return-type defaults to `int'");
 
   /* Effective C++ rule 15.  See also c_expand_return.  */
   if (warn_ecpp
       && DECL_NAME (decl1) == ansi_opname[(int) MODIFY_EXPR]
       && TREE_CODE (TREE_TYPE (fntype)) == VOID_TYPE)
-    cp_warning (ec_operator_should_return_a_reference_to_this);
+    cp_warning ("`operator=' should return a reference to `*this'");
 
   /* Make the init_value nonzero so pushdecl knows this is not tentative.
      error_mark_node is replaced below (in poplevel) with the BLOCK.  */
@@ -12631,7 +12643,7 @@ store_parm_decls ()
                  pushdecl (parm);
                }
              else if (TREE_CODE (TREE_TYPE (parm)) == VOID_TYPE)
-               cp_error (ec_parameter_declared_void, parm);
+               cp_error ("parameter `%D' declared void", parm);
              else
                {
                  /* Now fill in DECL_REFERENCE_SLOT for any of the parm decls.
@@ -12710,7 +12722,7 @@ store_parm_decls ()
       for (cleanups = nreverse (cleanups); cleanups; cleanups = TREE_CHAIN (cleanups))
        {
          if (! expand_decl_cleanup (TREE_PURPOSE (cleanups), TREE_VALUE (cleanups)))
-           cp_error (ec_parser_lost_in_parsing_declaration_of,
+           cp_error ("parser lost in parsing declaration of `%D'",
                      TREE_PURPOSE (cleanups));
        }
     }
@@ -12748,7 +12760,7 @@ store_return_init (return_id, init)
     /* Give this error as many times as there are occurrences,
        so that users can use Emacs compilation buffers to find
        and fix all such places.  */
-    cp_pedwarn (ec_does_not_permit_named_return_values);
+    pedwarn ("ANSI C++ does not permit named return values");
 
   if (return_id != NULL_TREE)
     {
@@ -12758,13 +12770,13 @@ store_return_init (return_id, init)
          DECL_ASSEMBLER_NAME (decl) = return_id;
        }
       else
-       cp_error (ec_return_identifier_already_in_place, decl);
+       cp_error ("return identifier `%D' already in place", decl);
     }
 
   /* Can't let this happen for constructors.  */
   if (DECL_CONSTRUCTOR_P (current_function_decl))
     {
-      cp_error (ec_cant_redefine_default_return_value_for_constructors);
+      error ("can't redefine default return value for constructors");
       return;
     }
 
@@ -13314,20 +13326,20 @@ finish_function (lineno, call_poplevel, nested)
        current_function_returns_null = 0;
 
       if (TREE_THIS_VOLATILE (fndecl) && current_function_returns_null)
-       cp_warning (ec_noreturn_function_does_return, fndecl);
+       cp_warning ("`noreturn' function `%D' does return", fndecl);
       else if ((warn_return_type || pedantic)
               && current_function_returns_null
               && TREE_CODE (TREE_TYPE (fntype)) != VOID_TYPE)
        {
          /* If this function returns non-void and control can drop through,
             complain.  */
-         cp_warning (ec_control_reaches_end_of_nonvoid_function, fndecl);
+         cp_warning ("control reaches end of non-void function `%D'", fndecl);
        }
       /* With just -W, complain only if function returns both with
         and without a value.  */
       else if (extra_warnings
               && current_function_returns_value && current_function_returns_null)
-       cp_warning (ec_this_function_may_return_with_or_without_a_value);
+       warning ("this function may return with or without a value");
     }
 
   --function_depth;
@@ -13425,8 +13437,8 @@ start_method (declspecs, declarator)
        {
          if (DECL_CONTEXT (fndecl) 
              && TREE_CODE( DECL_CONTEXT (fndecl)) != NAMESPACE_DECL)
-           cp_error (ec_is_already_defined_in_class, fndecl,
-                     TYPE_NAME_STRING (DECL_CONTEXT (fndecl)));
+           cp_error ("`%D' is already defined in class %s", fndecl,
+                            TYPE_NAME_STRING (DECL_CONTEXT (fndecl)));
        }
       return void_type_node;
     }
@@ -13588,7 +13600,7 @@ hack_incomplete_structures (type)
              cleanup = maybe_build_cleanup (decl);
              expand_decl_init (decl);
              if (! expand_decl_cleanup (decl, cleanup))
-               cp_error (ec_parser_lost_in_parsing_declaration_of,
+               cp_error ("parser lost in parsing declaration of `%D'",
                          decl);
            }
          *list = TREE_CHAIN (*list);
@@ -13689,16 +13701,16 @@ cplus_expand_expr_stmt (exp)
   if (TREE_TYPE (exp) == unknown_type_node)
     {
       if (TREE_CODE (exp) == ADDR_EXPR || TREE_CODE (exp) == TREE_LIST)
-       cp_error (ec_address_of_overloaded_function_with_no_contextual_type_information);
+       error ("address of overloaded function with no contextual type information");
       else if (TREE_CODE (exp) == COMPONENT_REF)
-       cp_warning (ec_useless_reference_to_a_member_function_name_did_you_forget_the);
+       warning ("useless reference to a member function name, did you forget the ()?");
     }
   else
     {
       if (TREE_CODE (exp) == FUNCTION_DECL)
        {
-         cp_warning (ec_reference_not_call_to_function, exp);
-         cp_warning (ec_at_this_point_in_file);
+         cp_warning ("reference, not call, to function `%D'", exp);
+         warning ("at this point in file");
        }
 
 #if 0
@@ -13767,9 +13779,9 @@ revert_static_member_fn (decl, fn, argtypes)
   tree args = argtypes ? *argtypes : TYPE_ARG_TYPES (function);
 
   if (TYPE_READONLY (TREE_TYPE (TREE_VALUE (args))))
-    cp_error (ec_static_member_function_declared_const, *decl);
+    cp_error ("static member function `%#D' declared const", *decl);
   if (TYPE_VOLATILE (TREE_TYPE (TREE_VALUE (args))))
-    cp_error (ec_static_member_function_declared_volatile, *decl);
+    cp_error ("static member function `%#D' declared volatile", *decl);
 
   args = TREE_CHAIN (args);
   tmp = build_function_type (TREE_TYPE (function), args);
index ec3af45416767c05958d6e9ec637a388384c1b17..be8689ce189a2c48c2ea3a65824b2257a93a6bc7 100644 (file)
@@ -181,9 +181,6 @@ int flag_init_priority = 1;
 int flag_init_priority;
 #endif
 
-/* Nonzero means show diagnostic codes when printing error messages.  */
-int flag_diag_codes;
-
 /* Nonzero means warn about implicit declarations.  */
 
 int warn_implicit = 1;
@@ -490,8 +487,7 @@ static struct { char *string; int *variable; int on_value;} lang_f_options[] =
   {"check-new", &flag_check_new, 1},
   {"repo", &flag_use_repository, 1},
   {"for-scope", &flag_new_for_scope, 2},
-  {"weak", &flag_weak, 1},
-  {"diag-codes", &flag_diag_codes, 1}
+  {"weak", &flag_weak, 1}
 };
 
 /* Decode the string P as a language-specific option.
@@ -534,7 +530,7 @@ lang_decode_option (argc, argv)
 
       if (!strcmp (p, "handle-exceptions")
          || !strcmp (p, "no-handle-exceptions"))
-       cp_warning (ec_fhandleexceptions_has_been_renamed_to_fexceptions_and_is_now_on_by_default);
+       warning ("-fhandle-exceptions has been renamed to -fexceptions (and is now on by default)");
 
       if (!strcmp (p, "memoize-lookups")
          || !strcmp (p, "no-memoize-lookups")
@@ -553,7 +549,7 @@ lang_decode_option (argc, argv)
               || !strcmp (p, "no-nonnull-objects")
               || !strcmp (p, "no-ansi-overloading"))
        {
-         cp_warning (ec_fs_is_no_longer_supported, p);
+         warning ("-f%s is no longer supported", p);
          found = 1;
        }
       else if (! strcmp (p, "alt-external-templates"))
@@ -606,7 +602,7 @@ lang_decode_option (argc, argv)
                endp++;
              else
                {
-                 cp_error (ec_invalid_option_s, p - 2);
+                 error ("Invalid option `%s'", p - 2);
                  goto template_depth_lose;
                }
            }
@@ -622,7 +618,7 @@ lang_decode_option (argc, argv)
                endp++;
              else
                {
-                 cp_error (ec_invalid_option_s, p - 2);
+                 error ("Invalid option `%s'", p - 2);
                  goto mangling_version_lose;
                }
            }
@@ -715,25 +711,6 @@ lang_decode_option (argc, argv)
        warn_unknown_pragmas = setting * 2;
       else if (!strcmp (p, "non-template-friend"))
        warn_nontemplate_friend = setting;
-      else if (!strncmp (p, "number-", strlen ("number-")))
-       {
-         char *endp = p + strlen ("number-");
-         while (*endp)
-           {
-             if (*endp >= '0' && *endp <= '9')
-               endp++;
-             else 
-               {
-                 cp_error (ec_invalid_option_s, p - 2);
-                 endp = 0;
-               }
-           }
-         if (endp)
-           {
-             int warning_number = atoi (p + strlen ("number-"));
-             cp_enable_warning (warning_number, setting);
-           }
-       }
       else if (!strcmp (p, "comment"))
        ;                       /* cpp handles this one.  */
       else if (!strcmp (p, "comments"))
@@ -804,7 +781,7 @@ grok_method_quals (ctype, function, quals)
       if (TREE_VALUE (quals) == ridpointers[(int)RID_CONST])
        {
          if (TYPE_READONLY (ctype))
-           cp_error (ec_duplicate_s_s,
+           error ("duplicate `%s' %s",
                   IDENTIFIER_POINTER (TREE_VALUE (quals)),
                   (TREE_CODE (function) == FUNCTION_DECL
                    ? "for member function" : "in type declaration"));
@@ -814,7 +791,7 @@ grok_method_quals (ctype, function, quals)
       else if (TREE_VALUE (quals) == ridpointers[(int)RID_VOLATILE])
        {
          if (TYPE_VOLATILE (ctype))
-           cp_error (ec_duplicate_s_s,
+           error ("duplicate `%s' %s",
                   IDENTIFIER_POINTER (TREE_VALUE (quals)),
                   (TREE_CODE (function) == FUNCTION_DECL
                    ? "for member function" : "in type declaration"));
@@ -860,13 +837,13 @@ warn_if_unknown_interface (decl)
          lineno = til->line;
          input_filename = til->file;
        }
-      cp_warning (ec_template_instantiated_in_file_without_pragma_interface,
+      cp_warning ("template `%#D' instantiated in file without #pragma interface",
                  decl);
       lineno = sl;
       input_filename = sf;
     }
   else
-    cp_warning_at (ec_template_defined_in_file_without_pragma_interface,
+    cp_warning_at ("template `%#D' defined in file without #pragma interface",
                   decl);
 }
 
@@ -889,7 +866,7 @@ grok_x_components (specs, components)
 
       if (t == NULL_TREE)
        {
-         cp_error (ec_error_in_component_specification);
+         error ("error in component specification");
          return NULL_TREE;
        }
 
@@ -956,7 +933,7 @@ grok_x_components (specs, components)
                    q = &TREE_CHAIN (*q);
                }
              if (TYPE_METHODS (t))
-               cp_error (ec_an_anonymous_union_cannot_have_function_members);
+               error ("an anonymous union cannot have function members");
 
              p = &pending_inlines;
              for (; *p; *p = (*p)->next)
@@ -978,7 +955,7 @@ grok_x_components (specs, components)
 
        default:
          if (t != void_type_node)
-           cp_error (ec_empty_component_declaration);
+           error ("empty component declaration");
          return NULL_TREE;
        }
     }
@@ -1075,7 +1052,7 @@ grokclassfn (ctype, cname, function, flags, quals)
 
   if (fn_name == NULL_TREE)
     {
-      cp_error (ec_name_missing_for_member_function);
+      error ("name missing for member function");
       fn_name = get_identifier ("<anonymous>");
       DECL_NAME (function) = fn_name;
     }
@@ -1145,7 +1122,7 @@ grok_alignof (expr)
 
   if (TREE_CODE (expr) == COMPONENT_REF
       && DECL_BIT_FIELD (TREE_OPERAND (expr, 1)))
-    cp_error (ec_alignof_applied_to_a_bitfield);
+    error ("`__alignof__' applied to a bit-field");
 
   if (TREE_CODE (expr) == INDIRECT_REF)
     {
@@ -1197,7 +1174,7 @@ grok_array_decl (array_expr, index_exp)
     {
       /* Something has gone very wrong.  Assume we are mistakenly reducing
         an expression instead of a declaration.  */
-      cp_error (ec_parser_may_be_lost_is_there_a_missing_somewhere);
+      error ("parser may be lost: is there a '{' missing somewhere?");
       return NULL_TREE;
     }
 
@@ -1228,7 +1205,7 @@ grok_array_decl (array_expr, index_exp)
   i2 = build_expr_type_conversion (WANT_INT | WANT_ENUM, index_exp, 0);
 
   if ((p1 && i2) && (i1 && p2))
-    cp_error (ec_ambiguous_conversion_for_array_subscript);
+    error ("ambiguous conversion for array subscript");
 
   if (p1 && i2)
     array_expr = p1, index_exp = i2;
@@ -1236,13 +1213,13 @@ grok_array_decl (array_expr, index_exp)
     array_expr = p2, index_exp = i1;
   else
     {
-      cp_error (ec_invalid_types_for_array_subscript,
+      cp_error ("invalid types `%T[%T]' for array subscript",
                type, TREE_TYPE (index_exp));
       return error_mark_node;
     }
 
   if (array_expr == error_mark_node || index_exp == error_mark_node)
-    cp_error (ec_ambiguous_conversion_for_array_subscript);
+    error ("ambiguous conversion for array subscript");
 
   return build_array_ref (array_expr, index_exp);
 }
@@ -1284,7 +1261,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
 
   if (t == NULL_TREE || t == error_mark_node)
     {
-      cp_error (ec_type_argument_given_to_delete_expected_pointer,
+      cp_error ("type `%#T' argument given to `delete', expected pointer",
                TREE_TYPE (exp));
       return error_mark_node;
     }
@@ -1292,7 +1269,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
   if (doing_vec == 2)
     {
       maxindex = build_binary_op (MINUS_EXPR, size, integer_one_node, 1);
-      cp_pedwarn (ec_anachronistic_use_of_array_size_in_vector_delete);
+      pedwarn ("anachronistic use of array size in vector delete");
     }
 
   type = TREE_TYPE (t);
@@ -1302,7 +1279,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
   /* You can't delete functions.  */
   if (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
     {
-      cp_error (ec_cannot_delete_a_function);
+      error ("cannot delete a function");
       return error_mark_node;
     }
 
@@ -1310,7 +1287,7 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
   if (TREE_CODE (t) == ADDR_EXPR
       && TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL
       && TREE_CODE (TREE_TYPE (TREE_OPERAND (t, 0))) == ARRAY_TYPE)
-    cp_warning (ec_deleting_array, TREE_OPERAND (t, 0));
+    cp_warning ("deleting array `%#D'", TREE_OPERAND (t, 0));
 
   /* Deleting a pointer with the value zero is valid and has no effect.  */
   if (integer_zerop (t))
@@ -1357,7 +1334,7 @@ check_member_template (tmpl)
        /* 14.5.2.2 [temp.mem]
           
           A local class shall not have member templates. */
-       cp_error (ec_declaration_of_member_template_in_local_class,
+       cp_error ("declaration of member template `%#D' in local class",
                  decl);
       
       if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VIRTUAL_P (decl))
@@ -1365,7 +1342,8 @@ check_member_template (tmpl)
          /* 14.5.2.3 [temp.mem]
 
             A member function template shall not be virtual.  */
-         cp_error (ec_invalid_use_of_virtual_in_template_declaration_of,
+         cp_error 
+           ("invalid use of `virtual' in template declaration of `%#D'",
             decl);
          DECL_VIRTUAL_P (decl) = 0;
        }
@@ -1375,7 +1353,7 @@ check_member_template (tmpl)
       DECL_IGNORED_P (tmpl) = 1;
     } 
   else
-    cp_error (ec_template_declaration_of, decl);
+    cp_error ("template declaration of `%#D'", decl);
 }
 
 /* Return true iff TYPE is a valid Java parameter or return type. */
@@ -1425,7 +1403,7 @@ check_java_method (ctype, method)
   tree ret_type = TREE_TYPE (TREE_TYPE (method));
   if (! acceptable_java_type (ret_type))
     {
-      cp_error (ec_ava_method_has_nonava_return_type,
+      cp_error ("Java method '%D' has non-Java return type `%T'",
                method, ret_type);
       jerr++;
     }
@@ -1434,7 +1412,7 @@ check_java_method (ctype, method)
       tree type = TREE_VALUE (arg_types);
       if (! acceptable_java_type (type))
        {
-         cp_error (ec_ava_method_has_nonava_parameter_type,
+         cp_error ("Java method '%D' has non-Java parameter type `%T'",
                    method, type);
          jerr++;
        }
@@ -1548,17 +1526,17 @@ check_classfn (ctype, function)
   if (methods != end)
     {
       tree fndecl = *methods;
-      cp_error (ec_prototype_for_does_not_match_any_in_class,
+      cp_error ("prototype for `%#D' does not match any in class `%T'",
                function, ctype);
-      cp_error_at (ec_candidates, OVL_NEXT (fndecl) ? "s are" : " is",
+      cp_error_at ("candidate%s: %+#D", OVL_NEXT (fndecl) ? "s are" : " is",
                   OVL_CURRENT (fndecl));
       while (fndecl = OVL_NEXT (fndecl), fndecl)
-       cp_error_at (ec_candidate_2, OVL_CURRENT(fndecl));
+       cp_error_at ("                %#D", OVL_CURRENT(fndecl));
     }
   else
     {
       methods = 0;
-      cp_error (ec_no_member_function_declared_in_class,
+      cp_error ("no `%#D' member function declared in class `%T'",
                function, ctype);
     }
 
@@ -1638,7 +1616,7 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
   if (DECL_NAME (value) != NULL_TREE
       && IDENTIFIER_POINTER (DECL_NAME (value))[0] == '_'
       && ! strcmp (IDENTIFIER_POINTER (DECL_NAME (value)), "_vptr"))
-    cp_error (ec_member_conflicts_with_virtual_function_table_field_name,
+    cp_error ("member `%D' conflicts with virtual function table field name",
              value);
 
   /* Stash away type declarations.  */
@@ -1663,13 +1641,13 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
   if (IS_SIGNATURE (current_class_type)
       && TREE_CODE (value) != FUNCTION_DECL)
     {
-      cp_error (ec_field_declaration_not_allowed_in_signature);
+      error ("field declaration not allowed in signature");
       return void_type_node;
     }
 
   if (DECL_IN_AGGR_P (value))
     {
-      cp_error (ec_is_already_defined_in_the_class, value,
+      cp_error ("`%D' is already defined in the class %T", value,
                  DECL_CONTEXT (value));
       return void_type_node;
     }
@@ -1682,7 +1660,7 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
       if (IS_SIGNATURE (current_class_type)
          && TREE_CODE (value) == FUNCTION_DECL)
        {
-         cp_error (ec_function_declarations_cannot_have_initializers_in_signature);
+         error ("function declarations cannot have initializers in signature");
          init = NULL_TREE;
        }
       else if (TREE_CODE (value) == FUNCTION_DECL)
@@ -1728,7 +1706,7 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
                      && (TREE_CODE_CLASS (TREE_CODE (init)) != 'd'
                          || DECL_EXTERNAL (init) == 0)))
                {
-                 cp_error (ec_field_initializer_is_not_constant);
+                 error ("field initializer is not constant");
                  init = error_mark_node;
                }
            }
@@ -1750,8 +1728,8 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
        tree olddecl = IDENTIFIER_LOCAL_VALUE (declarator);
        if (decl_template_parm_p (olddecl))
          {
-           cp_error (ec_redeclaration_of_template_parameter, declarator);
-           cp_error_at (ec_previously_declared_here, olddecl);
+           cp_error ("redeclaration of template parameter `%T'", declarator);
+           cp_error_at (" previously declared here `%#D'", olddecl);
          }
       }
 
@@ -1783,9 +1761,9 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
        {
          static int explanation = 0;
          
-         cp_error (ec_initializer_invalid_for_static_member_with_constructor);
+         error ("initializer invalid for static member with constructor");
          if (explanation++ == 0)
-           cp_error (ec_you_really_want_to_initialize_it_separately);
+           error ("(you really want to initialize it separately)");
          init = 0;
        }
       /* Force the compiler to know when an uninitialized static
@@ -1834,7 +1812,7 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist)
 
 #if 0 /* Just because a fn is declared doesn't mean we'll try to define it.  */
       if (current_function_decl && ! IS_SIGNATURE (current_class_type))
-       cp_error (ec_method_of_local_class_must_be_defined_in_class_body,
+       cp_error ("method `%#D' of local class must be defined in class body",
                  value);
 #endif
 
@@ -1864,7 +1842,7 @@ grokbitfield (declarator, declspecs, width)
 
   if (TREE_CODE (value) == TYPE_DECL)
     {
-      cp_error (ec_cannot_declare_to_be_a_bitfield_type, value);
+      cp_error ("cannot declare `%D' to be a bitfield type", value);
       return NULL_TREE;
     }
 
@@ -1874,20 +1852,20 @@ grokbitfield (declarator, declspecs, width)
      check here.  */
   if (TREE_CODE (value) == FUNCTION_DECL)
     {
-      cp_error (ec_cannot_declare_bitfield_with_funcion_type,
+      cp_error ("cannot declare bitfield `%D' with funcion type",
                DECL_NAME (value));
       return NULL_TREE;
     }
 
   if (IS_SIGNATURE (current_class_type))
     {
-      cp_error (ec_field_declaration_not_allowed_in_signature);
+      error ("field declaration not allowed in signature");
       return void_type_node;
     }
 
   if (DECL_IN_AGGR_P (value))
     {
-      cp_error (ec_is_already_defined_in_the_class, value,
+      cp_error ("`%D' is already defined in the class %T", value,
                  DECL_CONTEXT (value));
       return void_type_node;
     }
@@ -1896,7 +1874,7 @@ grokbitfield (declarator, declspecs, width)
 
   if (TREE_STATIC (value))
     {
-      cp_error (ec_static_member_cannot_be_a_bitfield, value);
+      cp_error ("static member `%D' cannot be a bitfield", value);
       return NULL_TREE;
     }
   cp_finish_decl (value, NULL_TREE, NULL_TREE, 0, 0);
@@ -1987,11 +1965,11 @@ grok_function_init (decl, init)
   tree type = TREE_TYPE (decl);
 
   if (TREE_CODE (type) == FUNCTION_TYPE)
-    cp_error (ec_initializer_specified_for_nonmember_function, decl);
+    cp_error ("initializer specified for non-member function `%D'", decl);
 #if 0
   /* We'll check for this in finish_struct_1.  */
   else if (DECL_VINDEX (decl) == NULL_TREE)
-    cp_error (ec_initializer_specified_for_nonvirtual_method, decl);
+    cp_error ("initializer specified for non-virtual method `%D'", decl);
 #endif
   else if (integer_zerop (init))
     {
@@ -2019,7 +1997,7 @@ grok_function_init (decl, init)
        }
     }
   else
-    cp_error (ec_invalid_initializer_for_virtual_method, decl);
+    cp_error ("invalid initializer for virtual method `%D'", decl);
 }
 \f
 void
@@ -2242,9 +2220,9 @@ build_anon_union_vars (anon_decl, elems, static_p, external_p)
        continue;
 
       if (TREE_PRIVATE (field))
-       cp_pedwarn_at (ec_private_member_in_anonymous_union, field);
+       cp_pedwarn_at ("private member `%#D' in anonymous union", field);
       else if (TREE_PROTECTED (field))
-       cp_pedwarn_at (ec_protected_member_in_anonymous_union, field);
+       cp_pedwarn_at ("protected member `%#D' in anonymous union", field);
 
       if (DECL_NAME (field) == NULL_TREE
          && TREE_CODE (TREE_TYPE (field)) == UNION_TYPE)
@@ -2314,7 +2292,7 @@ finish_anon_union (anon_union_decl)
 
   if (public_p)
     {
-      cp_error (ec_global_anonymous_unions_must_be_declared_static);
+      error ("global anonymous unions must be declared static");
       return;
     }
 
@@ -2330,7 +2308,7 @@ finish_anon_union (anon_union_decl)
        }
       else
        {
-         cp_warning (ec_anonymous_union_with_no_members);
+         warning ("anonymous union with no members");
          return;
        }
     }
@@ -2390,15 +2368,15 @@ coerce_new_type (type)
   if (TREE_CODE (type) == METHOD_TYPE)
     type = build_function_type (TREE_TYPE (type), TREE_CHAIN (TYPE_ARG_TYPES (type)));
   if (TREE_TYPE (type) != ptr_type_node)
-    e1 = 1, cp_error (ec_operator_new_must_return_type_void);
+    e1 = 1, error ("`operator new' must return type `void *'");
 
   /* Technically the type must be `size_t', but we may not know
      what that is.  */
   if (TYPE_ARG_TYPES (type) == NULL_TREE)
-    e1 = 1, cp_error (ec_operator_new_takes_type_size_t_parameter);
+    e1 = 1, error ("`operator new' takes type `size_t' parameter");
   else if (TREE_CODE (TREE_VALUE (TYPE_ARG_TYPES (type))) != INTEGER_TYPE
           || TYPE_PRECISION (TREE_VALUE (TYPE_ARG_TYPES (type))) != TYPE_PRECISION (sizetype))
-    e2 = 1, cp_error (ec_operator_new_takes_type_size_t_as_first_parameter);
+    e2 = 1, error ("`operator new' takes type `size_t' as first parameter");
   if (e2)
     type = build_function_type (ptr_type_node, tree_cons (NULL_TREE, sizetype, TREE_CHAIN (TYPE_ARG_TYPES (type))));
   else if (e1)
@@ -2423,11 +2401,11 @@ coerce_delete_type (type)
     }
 
   if (TREE_TYPE (type) != void_type_node)
-    e1 = 1, cp_error (ec_operator_delete_must_return_type_void);
+    e1 = 1, error ("`operator delete' must return type `void'");
 
   if (arg_types == NULL_TREE
       || TREE_VALUE (arg_types) != ptr_type_node)
-    e2 = 1, cp_error (ec_operator_delete_takes_type_void_as_first_parameter);
+    e2 = 1, error ("`operator delete' takes type `void *' as first parameter");
 
 #if 0
   if (arg_types
@@ -2439,14 +2417,14 @@ coerce_delete_type (type)
       tree t2 = TREE_VALUE (TREE_CHAIN (arg_types));
       if (TREE_CODE (t2) != INTEGER_TYPE
          || TYPE_PRECISION (t2) != TYPE_PRECISION (sizetype))
-       e3 = 1, cp_error (ec_second_argument_to_operator_delete_must_be_of_type_size_t);
+       e3 = 1, error ("second argument to `operator delete' must be of type `size_t'");
       else if (TREE_CHAIN (TREE_CHAIN (arg_types)) != void_list_node)
        {
          e3 = 1;
          if (TREE_CHAIN (TREE_CHAIN (arg_types)))
-           cp_error (ec_too_many_arguments_in_declaration_of_operator_delete);
+           error ("too many arguments in declaration of `operator delete'");
          else
-           cp_error (ec_invalid_in_specification_of_operator_delete);
+           error ("`...' invalid in specification of `operator delete'");
        }
     }
 
@@ -3003,7 +2981,7 @@ setup_initp ()
   if (! flag_init_priority)
     {
       for (t = static_aggregates_initp; t; t = TREE_CHAIN (t))
-       cp_warning (ec_init_priority_for_ignored_without_finitpriority,
+       cp_warning ("init_priority for `%#D' ignored without -finit-priority",
                    TREE_VALUE (t));
       return;
     }
@@ -3684,7 +3662,7 @@ reparse_absdcl_as_casts (decl, expr)
 
       if (IS_SIGNATURE (type))
        {
-         cp_error (ec_cast_specifies_signature_type);
+         error ("cast specifies signature type");
          return error_mark_node;
        }
 
@@ -3705,7 +3683,7 @@ reparse_absdcl_as_casts (decl, expr)
     }
 
   if (warn_old_style_cast)
-    cp_warning (ec_use_of_oldstyle_cast);
+    warning ("use of old-style cast");
 
   return expr;
 }
@@ -4046,7 +4024,7 @@ check_cp_case_value (value)
   if (TREE_CODE (value) != INTEGER_CST
       && value != error_mark_node)
     {
-      cp_error (ec_case_label_does_not_reduce_to_an_integer_constant,
+      cp_error ("case label `%E' does not reduce to an integer constant",
                value);
       value = error_mark_node;
     }
@@ -4210,10 +4188,10 @@ ambiguous_decl (name, old, new, flags)
          /* Some declarations are functions, some are not. */
           if (flags & LOOKUP_COMPLAIN)
             {
-              cp_error (ec_use_of_is_ambiguous, name);
-              cp_error_at (ec_first_declared_as_here,
+              cp_error ("use of `%D' is ambiguous", name);
+              cp_error_at ("  first declared as `%#D' here",
                            BINDING_VALUE (old));
-              cp_error_at (ec_also_declared_as_here, val);
+              cp_error_at ("  also declared as `%#D' here", val);
             }
          return error_mark_node;
        }
@@ -4228,9 +4206,9 @@ ambiguous_decl (name, old, new, flags)
     {
       if (flags & LOOKUP_COMPLAIN)
         {
-          cp_error (ec_denotes_an_ambiguous_type,name);
-          cp_error_at (ec_first_type_here, BINDING_TYPE (old));
-          cp_error_at (ec_other_type_here, type);
+          cp_error ("`%D' denotes an ambiguous type",name);
+          cp_error_at ("  first type here", BINDING_TYPE (old));
+          cp_error_at ("  other type here", type);
         }
     }
   return old;
@@ -4317,7 +4295,7 @@ set_decl_namespace (decl, scope)
   scope = ORIGINAL_NAMESPACE (scope);
   
   if (!is_namespace_ancestor (current_namespace, scope))
-    cp_error (ec_declaration_of_not_in_a_namespace_surrounding,
+    cp_error ("declaration of `%D' not in a namespace surrounding `%D'",
              decl, scope);
   DECL_CONTEXT (decl) = FROB_CONTEXT (scope);
   if (scope != current_namespace)
@@ -4342,7 +4320,7 @@ set_decl_namespace (decl, scope)
   else
     return;
  complain:
-  cp_error (ec_should_have_been_declared_inside,
+  cp_error ("`%D' should have been declared inside `%D'",
            decl, scope);
 } 
 
@@ -4445,9 +4423,9 @@ add_function (k, fn)
          {
            fn = f1; f1 = f2; f2 = fn;
          }
-       cp_error_at (ec_is_not_a_function, f1);
-       cp_error_at (ec_conflict_with, f2);
-       cp_error (ec_in_call_to, k->name);
+       cp_error_at ("`%D' is not a function,", f1);
+       cp_error_at ("  conflict with `%D'", f2);
+       cp_error ("  in call to `%D'", k->name);
        return 1;
       }
     else
@@ -4715,7 +4693,7 @@ do_namespace_alias (alias, namespace)
   if (TREE_CODE (namespace) != NAMESPACE_DECL)
     {
       /* The parser did not find it, so it's not there. */
-      cp_error (ec_unknown_namespace, namespace);
+      cp_error ("unknown namespace `%D'", namespace);
       return;
     }
 
@@ -4777,7 +4755,7 @@ do_nonmember_using_decl (scope, name, oldval, oldtype, newval, newtype)
 
   if (!BINDING_VALUE (decls) && !BINDING_TYPE (decls))
     {
-      cp_error (ec_not_declared, name);
+      cp_error ("`%D' not declared", name);
       return;
     }
 
@@ -4825,7 +4803,7 @@ do_nonmember_using_decl (scope, name, oldval, oldtype, newval, newtype)
   *newtype = BINDING_TYPE (decls);
   if (oldtype && *newtype && oldtype != *newtype)
     {
-      cp_error (ec_using_directive_introduced_ambiguous_type,
+      cp_error ("using directive `%D' introduced ambiguous type `%T'",
                name, oldtype);
       return;
     }
@@ -4892,13 +4870,13 @@ do_class_using_decl (decl)
   if (TREE_CODE (decl) != SCOPE_REF
       || TREE_CODE_CLASS (TREE_CODE (TREE_OPERAND (decl, 0))) != 't')
     {
-      cp_error (ec_usingdeclaration_for_nonmember_at_class_scope);
+      cp_error ("using-declaration for non-member at class scope");
       return NULL_TREE;
     }
   name = TREE_OPERAND (decl, 1);
   if (TREE_CODE (name) == BIT_NOT_EXPR)
     {
-      cp_error (ec_usingdeclaration_for_destructor);
+      cp_error ("using-declaration for destructor");
       return NULL_TREE;
     }
   if (TREE_CODE (name) == TYPE_DECL)
@@ -4925,12 +4903,12 @@ do_using_directive (namespace)
   if (TREE_CODE (namespace) == IDENTIFIER_NODE)
     {
       /* Lookup in lexer did not find a namespace. */
-      cp_error (ec_namespace_undeclared, namespace);
+      cp_error ("namespace `%T' undeclared", namespace);
       return;
     }
   if (TREE_CODE (namespace) != NAMESPACE_DECL)
     {
-      cp_error (ec_is_not_a_namespace, namespace);
+      cp_error ("`%T' is not a namespace", namespace);
       return;
     }
   namespace = ORIGINAL_NAMESPACE (namespace);
@@ -4953,7 +4931,7 @@ check_default_args (x)
        saw_def = 1;
       else if (saw_def)
        {
-         cp_error_at (ec_default_argument_missing_for_parameter_of,
+         cp_error_at ("default argument missing for parameter %P of `%+#D'",
                       i, x);
          break;
        }
@@ -4998,9 +4976,9 @@ handle_class_head (aggr, scope, id)
     return id;
 
   if (scope)
-    cp_error (ec_does_not_have_a_nested_type_named, scope, id);
+    cp_error ("`%T' does not have a nested type named `%D'", scope, id);
   else
-    cp_error (ec_no_filescope_type_named, id);
+    cp_error ("no file-scope type named `%D'", id);
 
   id = xref_tag
     (aggr, make_anon_name (), 1);
index 11c68259248609cdf6a935e22e281dde52204e09..10de8a9d12be660a0fe307465426f4fd93fb4132 100644 (file)
@@ -23,7 +23,6 @@ Boston, MA 02111-1307, USA.  */
 #include "system.h"
 #include "tree.h"
 #include "toplev.h"
-#include "cp-tree.h"
 
 /* cp_printer is the type of a function which converts an argument into
    a string for digestion by printf.  The cp_printer function should deal
@@ -38,36 +37,10 @@ extern cp_printer * cp_printers[256];
    when we're computing the conversion costs for a method call.  */
 int cp_silent = 0;
 
-/* The error messages themselves.  */
-typedef struct cp_err_msg {
-  /* The format of the error message.  */
-  char* format;
-
-  /* The code which we should check when deciding whether or not to
-     issue this message.  Used to indicate that some errors are "the
-     same" even though they have different formats.  */
-  error_code equiv_code;
-
-  /* A count of how many more times this warning has been enabled than
-     disabled.  (Ignored for errors.)  */
-  int enabled;
-} cp_err_msg;
-
-static cp_err_msg err_msgs[] = {
-#undef DEFERROR
-#undef DEFERRORNUM
-#define DEFERROR(code, format) DEFERRORNUM(code, format, code)
-#define DEFERRORNUM(code, format, equiv_code) \
-  { format, equiv_code, 1 },
-#include "cp-error.def"
-  { 0, 0, 0 }
-};
-
 typedef void errorfn ();       /* deliberately vague */
 
 extern char* cp_file_of PROTO((tree));
 extern int   cp_line_of PROTO((tree));
-static int   is_warning_enabled PROTO((error_code));
 
 #define STRDUP(f) (ap = (char *) alloca (strlen (f) +1), strcpy (ap, (f)), ap)
 
@@ -76,13 +49,13 @@ static int   is_warning_enabled PROTO((error_code));
 
 #ifdef __STDC__
 static void
-cp_thing (errorfn *errfn, int atarg1, error_code ec, va_list ap)
+cp_thing (errorfn *errfn, int atarg1, const char *format, va_list ap)
 #else
 static void
-cp_thing (errfn, atarg1, ec, ap)
+cp_thing (errfn, atarg1, format, ap)
      errorfn *errfn;
      int atarg1;
-     error_code ec;
+     const char *format;
      va_list ap;
 #endif
 {
@@ -93,29 +66,14 @@ cp_thing (errfn, atarg1, ec, ap)
   long offset;
   const char *f;
   tree atarg = 0;
-  char* format;
-
-  my_friendly_assert ((int) ec >= 0 && (int) ec < ec_last_error_code, 
-                     0);
-    
-  format = err_msgs[(int) ec].format;
-
-  my_friendly_assert (format != 0, 0);
 
-  len = strlen (format) + 1 /* '\0' */ + 16 /* code number */;
+  len = strlen (format) + 1;
   if (len > buflen)
     {
       buflen = len;
       buf = xrealloc (buf, buflen);
     }
-  if (flag_diag_codes) 
-    {
-      sprintf (buf, "[%d] ", (int) ec);
-      for (offset = 0; buf[offset]; ++offset)
-       ;
-    }
-  else
-    offset = 0;
+  offset = 0;
 
   for (f = format; *f; ++f)
     {
@@ -240,10 +198,10 @@ cp_thing (errfn, atarg1, ec, ap)
 }
 
 #ifdef __STDC__
-#define DECLARE(name) void name (error_code ec, ...)
-#define INIT va_start (ap, ec)
+#define DECLARE(name) void name (const char *format, ...)
+#define INIT va_start (ap, format)
 #else
-#define DECLARE(name) void name (ec, va_alist) error_code ec; va_dcl
+#define DECLARE(name) void name (format, va_alist) char *format; va_dcl
 #define INIT va_start (ap)
 #endif
 
@@ -252,7 +210,7 @@ DECLARE (cp_error)
   va_list ap;
   INIT;
   if (! cp_silent)
-    cp_thing ((errorfn *) error, 0, ec, ap);
+    cp_thing ((errorfn *) error, 0, format, ap);
   va_end (ap);
 }
 
@@ -260,8 +218,8 @@ DECLARE (cp_warning)
 {
   va_list ap;
   INIT;
-  if (! cp_silent && is_warning_enabled (ec))
-    cp_thing ((errorfn *) warning, 0, ec, ap);
+  if (! cp_silent)
+    cp_thing ((errorfn *) warning, 0, format, ap);
   va_end (ap);
 }
 
@@ -269,8 +227,8 @@ DECLARE (cp_pedwarn)
 {
   va_list ap;
   INIT;
-  if (! cp_silent && is_warning_enabled (ec))
-    cp_thing ((errorfn *) pedwarn, 0, ec, ap);
+  if (! cp_silent)
+    cp_thing ((errorfn *) pedwarn, 0, format, ap);
   va_end (ap);
 }
 
@@ -280,7 +238,7 @@ DECLARE (cp_compiler_error)
   va_list ap;
   INIT;
   if (! cp_silent)
-    cp_thing (compiler_error, 0, ec, ap);
+    cp_thing (compiler_error, 0, format, ap);
   va_end (ap);
 }
 
@@ -288,7 +246,7 @@ DECLARE (cp_sprintf)
 {
   va_list ap;
   INIT;
-  cp_thing ((errorfn *) sprintf, 0, ec, ap);
+  cp_thing ((errorfn *) sprintf, 0, format, ap);
   va_end (ap);
 }
 
@@ -297,7 +255,7 @@ DECLARE (cp_error_at)
   va_list ap;
   INIT;
   if (! cp_silent)
-    cp_thing ((errorfn *) error_with_file_and_line, 1, ec, ap);
+    cp_thing ((errorfn *) error_with_file_and_line, 1, format, ap);
   va_end (ap);
 }
 
@@ -305,8 +263,8 @@ DECLARE (cp_warning_at)
 {
   va_list ap;
   INIT;
-  if (! cp_silent && is_warning_enabled (ec))
-    cp_thing ((errorfn *) warning_with_file_and_line, 1, ec, ap);
+  if (! cp_silent)
+    cp_thing ((errorfn *) warning_with_file_and_line, 1, format, ap);
   va_end (ap);
 }
 
@@ -314,42 +272,7 @@ DECLARE (cp_pedwarn_at)
 {
   va_list ap;
   INIT;
-  if (! cp_silent && is_warning_enabled (ec))
-    cp_thing ((errorfn *) pedwarn_with_file_and_line, 1, ec, ap);
+  if (! cp_silent)
+    cp_thing ((errorfn *) pedwarn_with_file_and_line, 1, format, ap);
   va_end (ap);
 }
-
-/* If ON is non-zero, enable the warning with the indicated NUMBER.
-   If OFF is zero, disable it.  Actually, this function manipulates a
-   counter, so that enabling/disabling of warnings can nest
-   appropriately.  */
-
-void 
-cp_enable_warning (number, on)
-     int number;
-     int on;
-{
-  if (number < 0 || number > (int) ec_last_error_code)
-    error ("invalid warning number %d", number);
-  else if (on)
-    err_msgs[number].enabled++;
-  else
-    {
-      if (!err_msgs[number].enabled)
-       warning ("warning %d not enabled", number);
-      else
-       err_msgs[number].enabled--;
-    }
-}
-
-/* Returns non-zero if EC corresponds to an enabled error message.  */
-
-int
-is_warning_enabled (ec)
-     error_code ec;
-{
-  my_friendly_assert ((int) ec >= 0 && (int) ec < ec_last_error_code, 
-                     0);
-    
-  return err_msgs[(int) ec].enabled;
-}
index eb50219758609127252cba8245eea72d6c8fa8a6..69315beba39d3995198a8e438b1693708a700f14 100644 (file)
@@ -633,7 +633,7 @@ process_start_catch_block_old (declspecs, declarator)
       decl = grokdeclarator (declarator, declspecs, CATCHPARM, 1, NULL_TREE);
 
       if (decl == NULL_TREE)
-       cp_error (ec_invalid_catch_parameter);
+       error ("invalid catch parameter");
     }
 
   if (decl)
@@ -745,7 +745,7 @@ process_start_catch_block (declspecs, declarator)
       decl = grokdeclarator (declarator, declspecs, CATCHPARM, 1, NULL_TREE);
 
       if (decl == NULL_TREE)
-       cp_error (ec_invalid_catch_parameter);
+       error ("invalid catch parameter");
     }
 
   if (decl)
@@ -1173,7 +1173,7 @@ expand_throw (exp)
          exp = build_modify_expr (object, INIT_EXPR, exp);
 
          if (exp == error_mark_node)
-           cp_error (ec_in_thrown_expression);
+           error ("  in thrown expression");
 
          expand_expr (exp, const0_rtx, VOIDmode, 0);
          expand_eh_region_end (build_terminate_handler ());
@@ -1277,7 +1277,7 @@ build_throw (e)
     return build_min (THROW_EXPR, void_type_node, e);
 
   if (e == null_node)
-    cp_warning (ec_throwing_which_has_integral_not_pointer_type);
+    cp_warning ("throwing NULL, which has integral, not pointer type");
 
   e = build1 (THROW_EXPR, void_type_node, e);
   TREE_SIDE_EFFECTS (e) = 1;
index 8994891376a51bd87463ab613f078d89fc3f8671..4c3d8b602cefcc72005327f8c24ce1b079594793 100644 (file)
@@ -331,10 +331,10 @@ do_case (start, end)
 
   if (start != NULL_TREE && TREE_TYPE (start) != NULL_TREE 
       && POINTER_TYPE_P (TREE_TYPE (start)))
-    cp_error (ec_pointers_are_not_permitted_as_case_values);
+    error ("pointers are not permitted as case values");
 
   if (end && pedantic)
-    cp_pedwarn (ec_forbids_range_expressions_in_switch_statement);
+    pedwarn ("ANSI C++ forbids range expressions in switch statement");
 
   if (processing_template_decl)
     {
@@ -366,43 +366,43 @@ do_case (start, end)
       if (success == 1)
        {
          if (end)
-           cp_error (ec_case_label_not_within_a_switch_statement);
+           error ("case label not within a switch statement");
          else if (start)
-           cp_error (ec_case_label_not_within_a_switch_statement, start);
+           cp_error ("case label `%E' not within a switch statement", start);
          else
-           cp_error (ec_default_label_not_within_a_switch_statement);
+           error ("default label not within a switch statement");
        }
       else if (success == 2)
        {
          if (end)
            {
-             cp_error (ec_duplicate_or_overlapping_case_value);
-             cp_error_at (ec_this_is_the_first_entry_overlapping_that_value,
+             error ("duplicate (or overlapping) case value");
+             cp_error_at ("this is the first entry overlapping that value",
                           duplicate);
            }
          else if (start)
            {
-             cp_error (ec_duplicate_case_value, start);
-             cp_error_at (ec_previously_used_here, duplicate);
+             cp_error ("duplicate case value `%E'", start);
+             cp_error_at ("previously used here", duplicate);
            }
          else
            {
-             cp_error (ec_multiple_default_labels_in_one_switch);
-             cp_error_at (ec_this_is_the_first_default_label, duplicate);
+             error ("multiple default labels in one switch");
+             cp_error_at ("this is the first default label", duplicate);
            }
        }
       else if (success == 3)
-       cp_warning (ec_case_value_out_of_range);
+       warning ("case value out of range");
       else if (success == 4)
-       cp_warning (ec_empty_range_specified);
+       warning ("empty range specified");
       else if (success == 5)
        {
          if (end)
-           cp_error (ec_case_label_within_scope_of_cleanup_or_variable_array);
+           error ("case label within scope of cleanup or variable array");
          else if (! start)
-           cp_error (ec_default_label_within_scope_of_cleanup_or_variable_array);
+           error ("`default' label within scope of cleanup or variable array");
          else
-           cp_error (ec_case_label_within_scope_of_cleanup_or_variable_array, start);
+           cp_error ("case label `%E' within scope of cleanup or variable array", start);
        }
     }
   if (start)
index 0c42b92ad9697356eb2ea6db01873c5d789c21e8..d01ecdafdf1646734bacfd35d75a4a0ff551bf19 100644 (file)
@@ -155,9 +155,9 @@ add_friend (type, decl)
            {
              if (decl == TREE_VALUE (friends))
                {
-                 cp_warning (ec_is_already_a_friend_of_class,
+                 cp_warning ("`%D' is already a friend of class `%T'",
                              decl, type);
-                 cp_warning_at (ec_previous_friend_declaration_of,
+                 cp_warning_at ("previous friend declaration of `%D'",
                                 TREE_VALUE (friends));
                  return;
                }
@@ -205,11 +205,11 @@ add_friends (type, name, friend_type)
          if (friends)
            {
              if (friend_type)
-               cp_warning (ec_method_ss_is_already_a_friend_of_class,
+               warning ("method `%s::%s' is already a friend of class",
                         TYPE_NAME_STRING (friend_type),
                         IDENTIFIER_POINTER (name));
              else
-               cp_warning (ec_function_s_is_already_a_friend_of_class_s,
+               warning ("function `%s' is already a friend of class `%s'",
                         IDENTIFIER_POINTER (name),
                         IDENTIFIER_POINTER (DECL_NAME (typedecl)));
            }
@@ -252,12 +252,12 @@ make_friend_class (type, friend_type)
 
   if (IS_SIGNATURE (type))
     {
-      cp_error (ec_friend_declaration_in_signature_definition);
+      error ("`friend' declaration in signature definition");
       return;
     }
   if (IS_SIGNATURE (friend_type))
     {
-      cp_error (ec_signature_type_s_declared_friend,
+      error ("signature type `%s' declared `friend'",
             IDENTIFIER_POINTER (TYPE_IDENTIFIER (friend_type)));
       return;
     }
@@ -269,7 +269,7 @@ make_friend_class (type, friend_type)
         
         Friend declarations shall not declare partial
         specializations.  */
-      cp_error (ec_partial_specialization_declared_friend,
+      cp_error ("partial specialization `%T' declared `friend'",
                friend_type);
       return;
     }
@@ -281,7 +281,7 @@ make_friend_class (type, friend_type)
     is_template_friend = 1;
   else if (comptypes (type, friend_type, 1))
     {
-      cp_pedwarn (ec_class_s_is_implicitly_friends_with_itself,
+      pedwarn ("class `%s' is implicitly friends with itself",
               TYPE_NAME_STRING (type));
       return;
     }
@@ -301,7 +301,7 @@ make_friend_class (type, friend_type)
              comptypes (TREE_VALUE (classes), friend_type, 1)))
     classes = TREE_CHAIN (classes);
   if (classes) 
-    cp_warning (ec_is_already_a_friend_of,
+    cp_warning ("`%T' is already a friend of `%T'",
                TREE_VALUE (classes), type);
   else
     {
@@ -384,7 +384,7 @@ do_friend (ctype, declarator, decl, parmdecls, flags, quals, funcdef_flag)
                  TYPE_SIZE (ctype) || template_class_depth (ctype) > 0)
                add_friend (current_class_type, decl);
              else
-               cp_error (ec_member_declared_as_friend_before_type_defined,
+               cp_error ("member `%D' declared as friend before type `%T' defined",
                          decl, ctype);
            }
        }
@@ -399,7 +399,7 @@ do_friend (ctype, declarator, decl, parmdecls, flags, quals, funcdef_flag)
          if (fields)
            add_friends (current_class_type, declarator, ctype);
          else
-           cp_error (ec_method_is_not_a_member_of_class,
+           cp_error ("method `%D' is not a member of class `%T'",
                      declarator, ctype);
          decl = void_type_node;
        }
@@ -452,14 +452,14 @@ do_friend (ctype, declarator, decl, parmdecls, flags, quals, funcdef_flag)
              && current_template_parms && uses_template_parms (decl))
            {
              static int explained;
-             cp_warning (ec_friend_declaration, decl);
-             cp_warning (ec_declares_a_nontemplate_function);
+             cp_warning ("friend declaration `%#D'", decl);
+             warning ("  declares a non-template function");
              if (! explained)
                {
-                 cp_warning (ec_if_this_is_not_what_you_intended_make_sure);
-                 cp_warning (ec_the_function_template_has_already_been_declared);
-                 cp_warning (ec_and_add_after_the_function_name_here);
-                 cp_warning (ec_o_disable_warning_use_nonontemplatefriend);
+                 warning ("  (if this is not what you intended, make sure");
+                 warning ("  the function template has already been declared,");
+                 warning ("  and add <> after the function name here)");
+                 warning ("  To disable warning use -Wno-non-template-friend");
                  explained = 1;
                }
            }
@@ -477,7 +477,7 @@ do_friend (ctype, declarator, decl, parmdecls, flags, quals, funcdef_flag)
       tree decl = lookup_name_nonclass (declarator);
       if (decl == NULL_TREE)
        {
-         cp_warning (ec_implicitly_declaring_as_struct, declarator);
+         cp_warning ("implicitly declaring `%T' as struct", declarator);
          decl = xref_tag (record_type_node, declarator, 1);
          decl = TYPE_MAIN_DECL (decl);
        }
@@ -486,7 +486,7 @@ do_friend (ctype, declarator, decl, parmdecls, flags, quals, funcdef_flag)
         but not if those functions are really class names.  */
       if (TREE_CODE (decl) == TREE_LIST && TREE_TYPE (TREE_PURPOSE (decl)))
        {
-         cp_warning (ec_friend_archaic_use_friend_class_instead,
+         cp_warning ("`friend %T' archaic, use `friend class %T' instead",
                      declarator, declarator);
          decl = TREE_TYPE (TREE_PURPOSE (decl));
        }
index d6202306bdec86dc3e600c63054ed7359ce8e44f..0c15675c736003230fbbe67240f800b45ba11d6c 100644 (file)
@@ -190,7 +190,7 @@ perform_member_init (member, name, init, explicit)
                init = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE);
              else if (TREE_CODE (type) == REFERENCE_TYPE)
                {
-                 cp_error (ec_defaultinitialization_of_which_has_reference_type,
+                 cp_error ("default-initialization of `%#D', which has reference type",
                            member);
                  init = error_mark_node;
                }
@@ -199,7 +199,7 @@ perform_member_init (member, name, init, explicit)
            }
          /* member traversal: note it leaves init NULL */
          else if (TREE_CODE (TREE_TYPE (member)) == REFERENCE_TYPE)
-           cp_pedwarn (ec_uninitialized_reference_member, member);
+           cp_pedwarn ("uninitialized reference member `%D'", member);
        }
       else if (TREE_CODE (init) == TREE_LIST)
        {
@@ -207,7 +207,7 @@ perform_member_init (member, name, init, explicit)
             work in that case.  */
          if (TREE_CHAIN (init))
            {
-             cp_warning (ec_initializer_list_treated_as_compound_expression);
+             warning ("initializer list treated as compound expression");
              init = build_compound_expr (init);
            }
          else
@@ -298,9 +298,9 @@ sort_member_init (t)
                {
                  if (pos < last_pos)
                    {
-                     cp_warning_at (ec_member_initializers_for, last_field);
-                     cp_warning_at (ec_and, field);
-                     cp_warning (ec_will_be_reordered_to_match_declaration_order);
+                     cp_warning_at ("member initializers for `%#D'", last_field);
+                     cp_warning_at ("  and `%#D'", field);
+                     warning ("  will be re-ordered to match declaration order");
                    }
                  last_pos = pos;
                  last_field = field;
@@ -329,7 +329,7 @@ sort_member_init (t)
        {
          if (purpose_member (name, init_list))
            {
-             cp_error (ec_multiple_initializations_given_for_member,
+             cp_error ("multiple initializations given for member `%D'",
                        IDENTIFIER_CLASS_VALUE (name));
              continue;
            }
@@ -377,13 +377,13 @@ sort_base_init (t, rbase_ptr, vbase_ptr)
          switch (n_baseclasses)
            {
            case 0:
-             cp_error (ec_does_not_have_a_base_class_to_initialize,
+             cp_error ("`%T' does not have a base class to initialize",
                        current_class_type);
              return;
            case 1:
              break;
            default:
-             cp_error (ec_unnamed_initializer_ambiguous_for_which_uses_multiple_inheritance,
+             cp_error ("unnamed initializer ambiguous for `%T' which uses multiple inheritance",
                        current_class_type);
              return;
            }
@@ -415,7 +415,7 @@ sort_base_init (t, rbase_ptr, vbase_ptr)
                  break;
              if (i < 0)
                {
-                 cp_error (ec_is_not_an_immediate_base_class_of,
+                 cp_error ("`%T' is not an immediate base class of `%T'",
                            basetype, current_class_type);
                  continue;
                }
@@ -453,9 +453,9 @@ sort_base_init (t, rbase_ptr, vbase_ptr)
                {
                  if (pos < last_pos)
                    {
-                     cp_warning_at (ec_base_initializers_for, last_base);
-                     cp_warning_at (ec_and, BINFO_TYPE (binfo));
-                     cp_warning (ec_will_be_reordered_to_match_inheritance_order);
+                     cp_warning_at ("base initializers for `%#T'", last_base);
+                     cp_warning_at ("  and `%#T'", BINFO_TYPE (binfo));
+                     warning ("  will be re-ordered to match inheritance order");
                    }
                  last_pos = pos;
                  last_base = BINFO_TYPE (binfo);
@@ -578,7 +578,7 @@ emit_base_init (t, immediately)
        {
          init = NULL_TREE;
          if (extra_warnings && copy_args_p (current_function_decl))
-           cp_warning (ec_base_class_should_be_explicitly_initialized_in_the_copy_constructor,
+           cp_warning ("base class `%#T' should be explicitly initialized in the copy constructor",
                        BINFO_TYPE (base_binfo));
        }
 
@@ -658,7 +658,7 @@ emit_base_init (t, immediately)
          if (warn_ecpp && init == NULL_TREE
              && !DECL_ARTIFICIAL (member)
              && TREE_CODE (TREE_TYPE (member)) != ARRAY_TYPE)
-           cp_warning (ec_should_be_initialized_in_the_member_initialization_list, member);        
+           cp_warning ("`%D' should be initialized in the member initialization list", member);            
        }
 
       perform_member_init (member, name, init, from_init_list);
@@ -683,7 +683,7 @@ emit_base_init (t, immediately)
            {
              field = TREE_VALUE (field);
              if (decl_type_context (field) != current_class_type)
-               cp_error (ec_field_not_in_immediate_context, field);
+               cp_error ("field `%D' not in immediate context", field);
            }
 
 #if 0
@@ -731,7 +731,7 @@ check_base_init (t)
   tree member;
   for (member = TYPE_FIELDS (t); member; member = TREE_CHAIN (member))
     if (DECL_NAME (member) && TREE_USED (member))
-      cp_error (ec_field_used_before_initialized_after_assignment_to_this,
+      cp_error ("field `%D' used before initialized (after assignment to `this')",
                member);
 }
 
@@ -855,13 +855,13 @@ member_init_ok_or_else (field, type, member_name)
     return 0;
   if (field == NULL_TREE || initializing_context (field) != type)
     {
-      cp_error (ec_class_does_not_have_any_field_named_s, type,
+      cp_error ("class `%T' does not have any field named `%s'", type,
                member_name);
       return 0;
     }
   if (TREE_STATIC (field))
     {
-      cp_error (ec_field_is_static_only_point_of_initialization_is_its_declaration,
+      cp_error ("field `%#D' is static; only point of initialization is its declaration",
                field);
       return 0;
     }
@@ -907,14 +907,14 @@ expand_member_init (exp, name, init)
     switch (CLASSTYPE_N_BASECLASSES (type))
       {
       case 0:
-       cp_error (ec_base_class_initializer_specified_but_no_base_class_to_initialize);
+       error ("base class initializer specified, but no base class to initialize");
        return;
       case 1:
        basetype = TYPE_BINFO_BASETYPE (type, 0);
        break;
       default:
-       cp_error (ec_initializer_for_unnamed_base_class_ambiguous);
-       cp_error (ec_type_uses_multiple_inheritance, type);
+       error ("initializer for unnamed base class ambiguous");
+       cp_error ("(type `%T' uses multiple inheritance)", type);
        return;
       }
 
@@ -940,7 +940,7 @@ expand_member_init (exp, name, init)
            name = TYPE_IDENTIFIER (basetype);
          else
            {
-             cp_error (ec_no_base_class_to_initialize);
+             error ("no base class to initialize");
              return;
            }
 #endif
@@ -954,24 +954,24 @@ expand_member_init (exp, name, init)
          if (IDENTIFIER_CLASS_VALUE (name))
            goto try_member;
          if (TYPE_USES_VIRTUAL_BASECLASSES (type))
-           cp_error (ec_type_is_not_an_immediate_or_virtual_basetype_for,
+           cp_error ("type `%T' is not an immediate or virtual basetype for `%T'",
                      basetype, type);
          else
-           cp_error (ec_type_is_not_an_immediate_basetype_for,
+           cp_error ("type `%T' is not an immediate basetype for `%T'",
                      basetype, type);
          return;
        }
 
       if (purpose_member (basetype, current_base_init_list))
        {
-         cp_error (ec_base_class_already_initialized, basetype);
+         cp_error ("base class `%T' already initialized", basetype);
          return;
        }
 
       if (warn_reorder && current_member_init_list)
        {
-         cp_warning (ec_base_initializer_for, basetype);
-         cp_warning (ec_will_be_reordered_to_precede_member_initializations);
+         cp_warning ("base initializer for `%T'", basetype);
+         warning ("   will be re-ordered to precede member initializations");
        }
 
       base_init = build_tree_list (basetype, init);
@@ -989,7 +989,7 @@ expand_member_init (exp, name, init)
 
       if (purpose_member (name, current_member_init_list))
        {
-         cp_error (ec_field_already_initialized, field);
+         cp_error ("field `%D' already initialized", field);
          return;
        }
 
@@ -1080,7 +1080,7 @@ expand_aggr_init (exp, init, alias_this, flags)
               COMPLEX zees(1.0, 0.0)[10];
             }
          */
-         cp_error (ec_bad_array_initializer);
+         error ("bad array initializer");
          return;
        }
       expand_vec_init (exp, exp, array_type_nelts (type), init,
@@ -1268,7 +1268,7 @@ is_aggr_typedef (name, or_else)
   else
     {
       if (or_else)
-       cp_error (ec_is_not_an_aggregate_typedef, name);
+       cp_error ("`%T' is not an aggregate typedef", name);
       return 0;
     }
 
@@ -1277,7 +1277,7 @@ is_aggr_typedef (name, or_else)
       && TREE_CODE (type) != TEMPLATE_TEMPLATE_PARM)
     {
       if (or_else)
-       cp_error (ec_is_not_an_aggregate_type, type);
+       cp_error ("`%T' is not an aggregate type", type);
       return 0;
     }
   return 1;
@@ -1299,7 +1299,7 @@ is_aggr_type (type, or_else)
       && TREE_CODE (type) != TEMPLATE_TEMPLATE_PARM)
     {
       if (or_else)
-       cp_error (ec_is_not_an_aggregate_type, type);
+       cp_error ("`%T' is not an aggregate type", type);
       return 0;
     }
   return 1;
@@ -1322,7 +1322,7 @@ get_aggr_from_typedef (name, or_else)
   else
     {
       if (or_else)
-       cp_error (ec_fails_to_be_an_aggregate_typedef, name);
+       cp_error ("`%T' fails to be an aggregate typedef", name);
       return NULL_TREE;
     }
 
@@ -1331,7 +1331,7 @@ get_aggr_from_typedef (name, or_else)
       && TREE_CODE (type) != TEMPLATE_TEMPLATE_PARM)
     {
       if (or_else)
-       cp_error (ec_type_is_of_nonaggregate_type, type);
+       cp_error ("type `%T' is of non-aggregate type", type);
       return NULL_TREE;
     }
   return type;
@@ -1415,7 +1415,7 @@ build_member_call (type, name, parmlist)
 
   if (dtor)
     {
-      cp_error (ec_cannot_call_destructor_without_object, type,
+      cp_error ("cannot call destructor `%T::~%T' without object", type,
                method_name);
       return error_mark_node;
     }
@@ -1470,7 +1470,7 @@ build_member_call (type, name, parmlist)
        {
          if (dont_use_this)
            {
-             cp_error (ec_invalid_use_of_nonstatic_field, t);
+             cp_error ("invalid use of non-static field `%D'", t);
              return error_mark_node;
            }
          decl = build (COMPONENT_REF, TREE_TYPE (t), decl, t);
@@ -1479,7 +1479,7 @@ build_member_call (type, name, parmlist)
        decl = t;
       else
        {
-         cp_error (ec_invalid_use_of_member, t);
+         cp_error ("invalid use of member `%D'", t);
          return error_mark_node;
        }
       if (TYPE_LANG_SPECIFIC (TREE_TYPE (decl)))
@@ -1489,7 +1489,7 @@ build_member_call (type, name, parmlist)
     }
   else
     {
-      cp_error (ec_no_method, type, name);
+      cp_error ("no method `%T::%D'", type, name);
       return error_mark_node;
     }
 }
@@ -1555,7 +1555,7 @@ build_offset_ref (type, name)
   if (TREE_CODE (name) == BIT_NOT_EXPR)
     {
       if (! check_dtor_name (type, name))
-       cp_error (ec_qualified_type_does_not_match_destructor_name,
+       cp_error ("qualified type `%T' does not match destructor name `~%T'",
                  type, TREE_OPERAND (name, 0));
       name = dtor_identifier;
     }
@@ -1574,7 +1574,7 @@ build_offset_ref (type, name)
        t = NULL_TREE;
       if (t == 0)
        {
-         cp_error (ec_incomplete_type_does_not_have_member, type,
+         cp_error ("incomplete type `%T' does not have member `%D'", type,
                      name);
          return error_mark_node;
        }
@@ -1652,14 +1652,14 @@ build_offset_ref (type, name)
          access = compute_access (basebinfo, t);
          if (access == access_protected_node)
            {
-             cp_error_at (ec_member_function_is_protected, t);
-             cp_error (ec_in_this_context);
+             cp_error_at ("member function `%#D' is protected", t);
+             error ("in this context");
              return error_mark_node;
            }
          if (access == access_private_node)
            {
-             cp_error_at (ec_member_function_is_private, t);
-             cp_error (ec_in_this_context);
+             cp_error_at ("member function `%#D' is private", t);
+             error ("in this context");
              return error_mark_node;
            }
          mark_used (t);
@@ -1693,7 +1693,7 @@ build_offset_ref (type, name)
 
   if (t == NULL_TREE)
     {
-      cp_error (ec_is_not_a_member_of_type, name, type);
+      cp_error ("`%D' is not a member of type `%T'", name, type);
       return error_mark_node;
     }
 
@@ -1712,7 +1712,7 @@ build_offset_ref (type, name)
 
   if (TREE_CODE (t) == FIELD_DECL && DECL_BIT_FIELD (t))
     {
-      cp_error (ec_illegal_pointer_to_bit_field, t);
+      cp_error ("illegal pointer to bit field `%D'", t);
       return error_mark_node;
     }
 
@@ -1741,7 +1741,7 @@ resolve_offset_ref (exp)
 
   if (TREE_CODE (exp) == TREE_LIST)
     {
-      cp_pedwarn (ec_assuming_on_overloaded_member_function);
+      cp_pedwarn ("assuming & on overloaded member function");
       return build_unary_op (ADDR_EXPR, exp, 0);
     }
 
@@ -1755,7 +1755,7 @@ resolve_offset_ref (exp)
       my_friendly_assert (TREE_CODE (type) == OFFSET_TYPE, 214);
       if (TYPE_OFFSET_BASETYPE (type) != current_class_type)
        {
-         cp_error (ec_object_missing_in_use_of_pointertomember_construct);
+         error ("object missing in use of pointer-to-member construct");
          return error_mark_node;
        }
       member = exp;
@@ -1784,9 +1784,9 @@ resolve_offset_ref (exp)
     {
       if (TREE_ADDRESSABLE (member) == 0)
        {
-         cp_error_at (ec_member_is_nonstatic_but_referenced_as_a_static_member,
+         cp_error_at ("member `%D' is non-static but referenced as a static member",
                       member);
-         cp_error (ec_at_this_point_in_file);
+         error ("at this point in file");
          TREE_ADDRESSABLE (member) = 1;
        }
       return error_mark_node;
@@ -1822,11 +1822,11 @@ resolve_offset_ref (exp)
       /* Issue errors if there was an access violation.  */
       if (access != access_public_node)
        {
-         cp_error_at (ec_member_is_s
+         cp_error_at ("member `%D' is %s"
                       access == access_private_node 
                       ? "private" : "protected",
                       member);
-         cp_error (ec_in_this_context);
+         cp_error ("in this context");
        } 
 
       /* Even in the case of illegal access, we form the
@@ -1852,7 +1852,7 @@ resolve_offset_ref (exp)
     {
       if (addr == error_mark_node)
        {
-         cp_error (ec_object_missing_in, exp);
+         cp_error ("object missing in `%E'", exp);
          return error_mark_node;
        }
 
@@ -2012,7 +2012,7 @@ build_new (placement, decl, init, use_global_new)
          if (this_nelts != error_mark_node)
            {
              if (this_nelts == NULL_TREE)
-               cp_error (ec_new_of_array_type_fails_to_specify_size);
+               error ("new of array type fails to specify size");
              else if (processing_template_decl)
                {
                  nelts = this_nelts;
@@ -2024,7 +2024,7 @@ build_new (placement, decl, init, use_global_new)
                  absdcl = TREE_OPERAND (absdcl, 0);
                  if (this_nelts == integer_zero_node)
                    {
-                     cp_warning (ec_zero_size_array_reserves_no_space);
+                     warning ("zero size array reserves no space");
                      nelts = integer_zero_node;
                    }
                  else
@@ -2099,13 +2099,13 @@ build_new (placement, decl, init, use_global_new)
      returned by new.'' ARM 5.3.3 */
   if (TREE_CODE (type) == REFERENCE_TYPE)
     {
-      cp_error (ec_new_cannot_be_applied_to_a_reference_type);
+      error ("new cannot be applied to a reference type");
       type = TREE_TYPE (type);
     }
 
   if (TREE_CODE (type) == FUNCTION_TYPE)
     {
-      cp_error (ec_new_cannot_be_applied_to_a_function_type);
+      error ("new cannot be applied to a function type");
       return error_mark_node;
     }
 
@@ -2232,7 +2232,7 @@ build_new_1 (exp)
 
   if (TREE_CODE (true_type) == VOID_TYPE)
     {
-      cp_error (ec_invalid_type_void_for_new);
+      error ("invalid type `void' for new");
       return error_mark_node;
     }
 
@@ -2276,7 +2276,7 @@ build_new_1 (exp)
       code = VEC_NEW_EXPR;
 
       if (init && pedantic)
-       cp_pedwarn (ec_initialization_in_array_new);
+       cp_pedwarn ("initialization in array new");
     }
 
   /* Allocate the object.  */
@@ -2288,7 +2288,7 @@ build_new_1 (exp)
        rval = NULL_TREE;
       else
        {
-         cp_error (ec_constructors_take_parameter_lists);
+         error ("constructors take parameter lists");
          return error_mark_node;
        }
     }
@@ -2405,10 +2405,10 @@ build_new_1 (exp)
          TREE_READONLY (deref) = 0;
 
          if (TREE_CHAIN (init) != NULL_TREE)
-           cp_pedwarn (ec_initializer_list_being_treated_as_compound_expression);
+           pedwarn ("initializer list being treated as compound expression");
          else if (TREE_CODE (init) == CONSTRUCTOR)
            {
-             cp_pedwarn (ec_initializer_list_appears_where_operand_should_be_used);
+             pedwarn ("initializer list appears where operand should be used");
              init = TREE_OPERAND (init, 1);
            }
          init = build_compound_expr (init);
@@ -2533,7 +2533,7 @@ build_new_1 (exp)
        }
     }
   else if (TYPE_READONLY (true_type))
-    cp_error (ec_uninitialized_const_in_new_of, true_type);
+    cp_error ("uninitialized const in `new' of `%#T'", true_type);
 
  done:
 
@@ -2856,7 +2856,7 @@ expand_vec_init (decl, base, maxindex, init, from_array)
                   && TYPE_NEEDS_CONSTRUCTING (type)
                   && ! TYPE_HAS_DEFAULT_CONSTRUCTOR (type))
            {
-             cp_error (ec_initializer_ends_prematurely);
+             error ("initializer ends prematurely");
              return error_mark_node;
            }
        }
@@ -3047,7 +3047,7 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
        addr = save_expr (addr);
       if (TYPE_DOMAIN (type) == NULL_TREE)
        {
-         cp_error (ec_unknown_array_size_in_delete);
+         error ("unknown array size in delete");
          return error_mark_node;
        }
       return build_vec_delete (addr, array_type_nelts (type),
@@ -3295,7 +3295,7 @@ build_vec_delete (base, maxindex, auto_delete_vec, auto_delete,
   else
     {
       if (base != error_mark_node)
-       cp_error (ec_type_to_vector_delete_is_neither_pointer_or_array_type);
+       error ("type to vector delete is neither pointer or array type");
       return error_mark_node;
     }
 
index c5aecb846492daf9b6d678e307e141f1306b2bac..32f5ff9050928baf41e9457f9e22169ccdc7b7fa 100644 (file)
@@ -101,8 +101,6 @@ DEFINE_LANG_NAME ("C++")
   { "-fno-weak", "" },
   { "-fxref", "Emit cross referencing information" },
   { "-fno-xref", "" },
-  { "-fdiag-codes", "Show code numbers when printing diagnostics" },
-  { "-fno-diag-codes", "" },
 
   { "-Wreturn-type", "Warn about inconsistent return types" },
   { "-Wno-return-type", "" },
@@ -128,6 +126,4 @@ DEFINE_LANG_NAME ("C++")
   { "-Wno-old-style-cast", "" },
   { "-Wnon-template-friend", "" }, 
   { "-Wno-non-template-friend", "Don't warn when non-templatized friend functions are declared within a template" },
-  { "-Wnumber-" },
-  { "-Wno-number-" },
 
index ec161b9dab6a4846d083a3dbe4be7548206b8ed6..e2ab945a0cdc2b768b5a539f5ff3f32b792927b9 100644 (file)
@@ -186,7 +186,7 @@ make_pointer_declarator (cv_qualifiers, target)
 {
   if (target && TREE_CODE (target) == IDENTIFIER_NODE
       && ANON_AGGRNAME_P (target))
-    cp_error (ec_type_name_expected_before_star);
+    error ("type name expected before `*'");
   target = build_parse_node (INDIRECT_REF, target);
   TREE_TYPE (target) = cv_qualifiers;
   return target;
@@ -208,16 +208,16 @@ make_reference_declarator (cv_qualifiers, target)
     {
       if (TREE_CODE (target) == ADDR_EXPR)
        {
-         cp_error (ec_cannot_declare_references_to_references);
+         error ("cannot declare references to references");
          return target;
        }
       if (TREE_CODE (target) == INDIRECT_REF)
        {
-         cp_error (ec_cannot_declare_pointers_to_references);
+         error ("cannot declare pointers to references");
          return target;
        }
       if (TREE_CODE (target) == IDENTIFIER_NODE && ANON_AGGRNAME_P (target))
-         cp_error (ec_type_name_expected_before_amp);
+         error ("type name expected before `&'");
     }
   target = build_parse_node (ADDR_EXPR, target);
   TREE_TYPE (target) = cv_qualifiers;
@@ -1082,7 +1082,7 @@ set_yydebug (value)
   extern int yydebug;
   yydebug = value;
 #else
-  cp_warning (ec_yydebug_not_defined);
+  warning ("YYDEBUG not defined.");
 #endif
 }
 
@@ -1293,7 +1293,7 @@ process_next_inline (t)
     yychar = yylex ();
   if (yychar != END_OF_SAVED_INPUT)
     {
-      cp_error (ec_parse_error_at_end_of_saved_function_text);
+      error ("parse error at end of saved function text");
 
       /* restore_pending_input will abort unless yychar is either
          END_OF_SAVED_INPUT or YYEMPTY; since we already know we're
@@ -1350,9 +1350,9 @@ consume_string (this_obstack, matching_char)
          int save_lineno = lineno;
          lineno = starting_lineno;
          if (matching_char == '"')
-           cp_error (ec_end_of_file_encountered_inside_string_constant);
+           error ("end of file encountered inside string constant");
          else
-           cp_error (ec_end_of_file_encountered_inside_character_constant);
+           error ("end of file encountered inside character constant");
          lineno = save_lineno;
          return;
        }
@@ -1369,7 +1369,7 @@ consume_string (this_obstack, matching_char)
       if (c == '\n')
        {
          if (pedantic)
-           cp_pedwarn (ec_forbids_newline_in_string_constant);
+           pedwarn ("ANSI C++ forbids newline in string constant");
          lineno++;
        }
       obstack_1grow (this_obstack, c);
@@ -1660,7 +1660,7 @@ reinit_parse_for_block (pyychar, obstackp)
            {
              if (look_for_lbrac)
                {
-                 cp_error (ec_function_body_for_constructor_missing);
+                 error ("function body for constructor missing");
                  obstack_1grow (obstackp, '{');
                  obstack_1grow (obstackp, '}');
                  len += 2;
@@ -1877,7 +1877,7 @@ finish_defarg ()
     yychar = yylex ();
   if (yychar != END_OF_SAVED_INPUT)
     {
-      cp_error (ec_parse_error_at_end_of_saved_function_text);
+      error ("parse error at end of saved function text");
 
       /* restore_pending_input will abort unless yychar is either
          END_OF_SAVED_INPUT or YYEMPTY; since we already know we're
@@ -2105,10 +2105,10 @@ check_for_missing_semicolon (type)
       || end_of_file)
     {
       if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (type)))
-       cp_error (ec_semicolon_missing_after_s_declaration,
+       error ("semicolon missing after %s declaration",
               TREE_CODE (type) == ENUMERAL_TYPE ? "enum" : "struct");
       else
-       cp_error (ec_semicolon_missing_after_declaration_of, type);
+       cp_error ("semicolon missing after declaration of `%T'", type);
       shadow_tag (build_tree_list (0, type));
     }
   /* Could probably also hack cases where class { ... } f (); appears.  */
@@ -2171,7 +2171,7 @@ skip_white_space (c)
          if (c == '\n')
            lineno++;
          else
-           cp_error (ec_stray_in_program);
+           error ("stray '\\' in program");
          c = getch ();
          break;
 
@@ -2328,7 +2328,7 @@ check_newline ()
                 an explcit -Wunknown-pragmas has been given. */
              if (warn_unknown_pragmas > 1
                  || (warn_unknown_pragmas && ! in_system_header))
-               cp_warning (ec_ignoring_pragma_s, token_buffer);
+               warning ("ignoring pragma: %s", token_buffer);
            }
          
          goto skipline;
@@ -2385,7 +2385,7 @@ check_newline ()
              if (token != STRING
                  || TREE_CODE (yylval.ttype) != STRING_CST)
                {
-                 cp_error (ec_invalid_ident);
+                 error ("invalid #ident");
                  goto skipline;
                }
 
@@ -2417,7 +2417,7 @@ check_newline ()
              goto skipline;
            }
        }
-      cp_error (ec_undefined_or_invalid_directive);
+      error ("undefined or invalid # directive");
       goto skipline;
     }
 
@@ -2468,7 +2468,7 @@ linenum:
 
       if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
        {
-         cp_error (ec_invalid_line);
+         error ("invalid #line");
          goto skipline;
        }
 
@@ -2610,7 +2610,7 @@ linenum:
                  if (c_header_level && --c_header_level == 0)
                    {
                      if (entering_c_header)
-                       cp_warning (ec_badly_nested_headers_from_preprocessor);
+                       warning ("badly nested C headers from preprocessor");
                      --pending_lang_change;
                    }
                  in_system_header = entering_system_header;
@@ -2622,7 +2622,7 @@ linenum:
                  debug_end_source_file (input_file_stack->line);
                }
              else
-               cp_error (ec_lines_for_entering_and_leaving_files_dont_match);
+               error ("#-lines for entering and leaving files don't match");
            }
          else
            in_system_header = entering_system_header;
@@ -2633,7 +2633,7 @@ linenum:
        c = EOF;
     }
   else
-    cp_error (ec_invalid_line);
+    error ("invalid #-line");
 
   /* skip the rest of this line.  */
  skipline:
@@ -2698,7 +2698,7 @@ readescape (ignore_ptr)
          nonnull = 1;
        }
       if (! nonnull)
-       cp_error (ec_x_used_with_no_following_hex_digits);
+       error ("\\x used with no following hex digits");
       else if (count == 0)
        /* Digits are all 0's.  Ok.  */
        ;
@@ -2706,7 +2706,7 @@ readescape (ignore_ptr)
               || (count > 1
                   && ((1 << (TYPE_PRECISION (integer_type_node) - (count - 1) * 4))
                       <= firstdig)))
-       cp_pedwarn (ec_hex_escape_out_of_range);
+       pedwarn ("hex escape out of range");
       return code;
 
     case '0':  case '1':  case '2':  case '3':  case '4':
@@ -2753,7 +2753,7 @@ readescape (ignore_ptr)
     case 'e':
     case 'E':
       if (pedantic)
-       cp_pedwarn (ec_nonstandard_escape_sequence_c, c);
+       pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c);
       return 033;
 
     case '?':
@@ -2766,13 +2766,13 @@ readescape (ignore_ptr)
       /* `\%' is used to prevent SCCS from getting confused.  */
     case '%':
       if (pedantic)
-       cp_pedwarn (ec_unknown_escape_sequence_c, c);
+       pedwarn ("unknown escape sequence `\\%c'", c);
       return c;
     }
   if (c >= 040 && c < 0177)
-    cp_pedwarn (ec_unknown_escape_sequence_c, c);
+    pedwarn ("unknown escape sequence `\\%c'", c);
   else
-    cp_pedwarn (ec_unknown_escape_sequence_followed_by_char_code_0xx, c);
+    pedwarn ("unknown escape sequence: `\\' followed by char code 0x%x", c);
   return c;
 }
 
@@ -2899,7 +2899,7 @@ do_identifier (token, parsing, args)
        my_friendly_abort (61);
       else
        {
-         cp_error (ec_invalid_use_of_member_from_base_class, field,
+         cp_error ("invalid use of member `%D' from base class `%T'", field,
                      DECL_FIELD_CONTEXT (field));
          id = error_mark_node;
          return id;
@@ -2943,7 +2943,7 @@ do_identifier (token, parsing, args)
       else if (IDENTIFIER_OPNAME_P (token))
        {
          if (token != ansi_opname[ERROR_MARK])
-           cp_error (ec_not_defined, token);
+           cp_error ("`%D' not defined", token);
          id = error_mark_node;
        }
       else if (in_call && ! flag_strict_prototype)
@@ -2952,7 +2952,7 @@ do_identifier (token, parsing, args)
        }
       else if (current_function_decl == 0)
        {
-         cp_error (ec_was_not_declared_in_this_scope, token);
+         cp_error ("`%D' was not declared in this scope", token);
          id = error_mark_node;
        }
       else
@@ -2962,12 +2962,12 @@ do_identifier (token, parsing, args)
            {
              static int undeclared_variable_notice;
 
-             cp_error (ec_undeclared_first_use_this_function, token);
+             cp_error ("`%D' undeclared (first use this function)", token);
 
              if (! undeclared_variable_notice)
                {
-                 cp_error (ec_ach_undeclared_identifier_is_reported_only_once);
-                 cp_error (ec_for_each_function_it_appears_in);
+                 error ("(Each undeclared identifier is reported only once");
+                 error ("for each function it appears in.)");
                  undeclared_variable_notice = 1;
                }
            }
@@ -2990,11 +2990,11 @@ do_identifier (token, parsing, args)
        {
          if (!DECL_ERROR_REPORTED (id))
            {
-             cp_warning (ec_name_lookup_of_s_changed,
+             warning ("name lookup of `%s' changed",
                       IDENTIFIER_POINTER (token));
-             cp_warning_at (ec_matches_this_under_current_rules,
+             cp_warning_at ("  matches this `%D' under current ANSI rules",
                             shadowed);
-             cp_warning_at (ec_matches_this_under_old_rules, id);
+             cp_warning_at ("  matches this `%D' under old rules", id);
              DECL_ERROR_REPORTED (id) = 1;
            }
          id = shadowed;
@@ -3007,13 +3007,13 @@ do_identifier (token, parsing, args)
          if (TYPE_NEEDS_DESTRUCTOR (TREE_TYPE (id)))
            {
              error (msg, IDENTIFIER_POINTER (token));
-             cp_error_at (ec_cannot_use_obsolete_binding_at_because_it_has_a_destructor, id);
+             cp_error_at ("  cannot use obsolete binding at `%D' because it has a destructor", id);
              id = error_mark_node;
            }
          else
            {
              pedwarn (msg, IDENTIFIER_POINTER (token));
-             cp_pedwarn_at (ec_using_obsolete_binding_at, id);
+             cp_pedwarn_at ("  using obsolete binding at `%D'", id);
            }
        }
     }
@@ -3025,7 +3025,7 @@ do_identifier (token, parsing, args)
          /* Check access.  */
          tree access = compute_access (TYPE_BINFO (current_class_type), id);
          if (access == access_private_node)
-           cp_error (ec_enum_is_private, id);
+           cp_error ("enum `%D' is private", id);
          /* protected is OK, since it's an enum of `this'.  */
        }
       if (!processing_template_decl
@@ -3104,7 +3104,7 @@ do_scoped_id (token, parsing)
       else
        {
          if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
-           cp_error (ec_undeclared_first_use_here, token);
+           cp_error ("`::%D' undeclared (first use here)", token);
          id = error_mark_node;
          /* Prevent repeated error messages.  */
          SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
@@ -3226,9 +3226,9 @@ real_yylex ()
 
     case '$':
       if (! dollars_in_ident)
-       cp_error (ec_in_identifier);
+       error ("`$' in identifier");
       else if (pedantic)
-       cp_pedwarn (ec_in_identifier);
+       pedwarn ("`$' in identifier");
       dollar_seen = 1;
       goto letter;
 
@@ -3284,9 +3284,9 @@ real_yylex ()
                if (c == '$')
                  {
                    if (! dollars_in_ident)
-                     cp_error (ec_in_identifier);
+                     error ("`$' in identifier");
                    else if (pedantic)
-                     cp_pedwarn (ec_in_identifier);
+                     pedwarn ("`$' in identifier");
                  }
 
                if (p >= token_buffer + maxtoken)
@@ -3314,9 +3314,9 @@ real_yylex ()
                if (c == '$')
                  {
                    if (! dollars_in_ident)
-                     cp_error (ec_in_identifier);
+                     error ("`$' in identifier");
                    else if (pedantic)
-                     cp_pedwarn (ec_in_identifier);
+                     pedwarn ("`$' in identifier");
                  }
 
                if (p >= token_buffer + maxtoken)
@@ -3366,7 +3366,7 @@ real_yylex ()
                         obstack.  */
 
                      if (ptr->rid != RID_EXTERN)
-                       cp_error (ec_invalid_modifier_s_for_language_string,
+                       error ("invalid modifier `%s' for language string",
                               ptr->name);
                      real_yylex ();
                      value = EXTERN_LANG_STRING;
@@ -3465,7 +3465,7 @@ real_yylex ()
                    || TEMP_NAME_P (tmp)
                    || ANON_AGGRNAME_P (tmp)
                    || ANON_PARMNAME_P (tmp)))
-             cp_warning (ec_identifier_name_s_conflicts_with_internal_naming_strategy,
+             warning ("identifier name `%s' conflicts with GNU C++ internal naming strategy",
                       token_buffer);
 #endif
 
@@ -3500,7 +3500,7 @@ real_yylex ()
                value = ELLIPSIS;
                goto done;
              }
-           cp_error (ec_parse_error_at);
+           error ("parse error at `..'");
          }
        if (ISDIGIT (c1))
          {
@@ -3589,13 +3589,13 @@ real_yylex ()
            if (c == '.')
              {
                if (base == 16)
-                 cp_error (ec_floating_constant_may_not_be_in_radix_16);
+                 error ("floating constant may not be in radix 16");
                if (floatflag == TOO_MANY_POINTS)
                  /* We have already emitted an error.  Don't need another.  */
                  ;
                else if (floatflag == AFTER_POINT)
                  {
-                   cp_error (ec_malformed_floating_constant);
+                   error ("malformed floating constant");
                    floatflag = TOO_MANY_POINTS;
                    /* Avoid another error from atof by forcing all characters
                       from here on to be ignored.  */
@@ -3622,7 +3622,7 @@ real_yylex ()
                            value = ELLIPSIS;
                            goto done;
                          }
-                       cp_error (ec_parse_error_at);
+                       error ("parse error at `..'");
                      }
                    nextchar = c;
                    token_buffer[1] = '\0';
@@ -3647,7 +3647,7 @@ real_yylex ()
                        floatflag = AFTER_POINT;
                        break;   /* start of exponent */
                      }
-                   cp_error (ec_nondigits_in_number_and_not_hexadecimal);
+                   error ("nondigits in number and not hexadecimal");
                    c = 0;
                  }
                else if (c >= 'a')
@@ -3688,10 +3688,10 @@ real_yylex ()
          }
 
        if (numdigits == 0)
-         cp_error (ec_numeric_constant_with_no_digits);
+         error ("numeric constant with no digits");
 
        if (largest_digit >= base)
-         cp_error (ec_numeric_constant_contains_digits_beyond_the_radix);
+         error ("numeric constant contains digits beyond the radix");
 
        /* Remove terminating char from the token buffer and delimit the string */
        *--p = 0;
@@ -3718,7 +3718,7 @@ real_yylex ()
                    c = getch ();
                  }
                if (! ISDIGIT (c))
-                 cp_error (ec_floating_constant_exponent_has_no_digits);
+                 error ("floating constant exponent has no digits");
                while (ISDIGIT (c))
                  {
                    if (p >= token_buffer + maxtoken - 3)
@@ -3734,7 +3734,7 @@ real_yylex ()
            /* Convert string to a double, checking for overflow.  */
            if (setjmp (handler))
              {
-               cp_error (ec_floating_constant_out_of_range);
+               error ("floating constant out of range");
                value = dconst0;
              }
            else
@@ -3757,21 +3757,21 @@ real_yylex ()
                      {
                      case 'f': case 'F':
                        if (fflag)
-                         cp_error (ec_more_than_one_f_in_numeric_constant);
+                         error ("more than one `f' in numeric constant");
                        fflag = 1;
                        break;
 
                      case 'l': case 'L':
                        if (lflag)
-                         cp_error (ec_more_than_one_l_in_numeric_constant);
+                         error ("more than one `l' in numeric constant");
                        lflag = 1;
                        break;
 
                      case 'i': case 'I':
                        if (imag)
-                         cp_error (ec_more_than_one_i_or_j_in_numeric_constant);
+                         error ("more than one `i' or `j' in numeric constant");
                        else if (pedantic)
-                         cp_pedwarn (ec_forbids_imaginary_numeric_constants);
+                         pedwarn ("ANSI C++ forbids imaginary numeric constants");
                        imag = 1;
                        break;
 
@@ -3796,7 +3796,7 @@ real_yylex ()
                if (fflag)
                  {
                    if (lflag)
-                     cp_error (ec_both_f_and_l_in_floating_constant);
+                     error ("both `f' and `l' in floating constant");
 
                    type = float_type_node;
                    value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
@@ -3804,20 +3804,20 @@ real_yylex ()
                       This is not pedwarn, become some people don't want
                       an error for this.  */
                    if (REAL_VALUE_ISINF (value) && pedantic)
-                     cp_warning (ec_floating_point_number_exceeds_range_of_float);
+                     warning ("floating point number exceeds range of `float'");
                  }
                else if (lflag)
                  {
                    type = long_double_type_node;
                    value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
                    if (REAL_VALUE_ISINF (value) && pedantic)
-                     cp_warning (ec_floating_point_number_exceeds_range_of_long_double);
+                     warning ("floating point number exceeds range of `long double'");
                  }
                else
                  {
                    value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
                    if (REAL_VALUE_ISINF (value) && pedantic)
-                     cp_warning (ec_floating_point_number_exceeds_range_of_double);
+                     warning ("floating point number exceeds range of `double'");
                  }
 
                set_float_handler (NULL_PTR);
@@ -3830,7 +3830,7 @@ real_yylex ()
                if (REAL_VALUES_LESS (dconst1, value)
                    || REAL_VALUES_LESS (value, dconstm1))
                  {
-                   cp_pedwarn (ec_floating_point_number_exceeds_range_of_s,
+                   pedwarn ("floating point number exceeds range of `%s'",
                             IDENTIFIER_POINTER (TYPE_IDENTIFIER (type)));
                    exceeds_double = 1;
                  }
@@ -3866,7 +3866,7 @@ real_yylex ()
                if (c == 'u' || c == 'U')
                  {
                    if (spec_unsigned)
-                     cp_error (ec_two_us_in_integer_constant);
+                     error ("two `u's in integer constant");
                    spec_unsigned = 1;
                  }
                else if (c == 'l' || c == 'L')
@@ -3874,9 +3874,9 @@ real_yylex ()
                    if (spec_long)
                      {
                        if (spec_long_long)
-                         cp_error (ec_three_ls_in_integer_constant);
+                         error ("three `l's in integer constant");
                        else if (pedantic && ! in_system_header && warn_long_long)
-                         cp_pedwarn (ec_forbids_long_long_integer_constants);
+                         pedwarn ("ANSI C++ forbids long long integer constants");
                        spec_long_long = 1;
                      }
                    spec_long = 1;
@@ -3884,9 +3884,9 @@ real_yylex ()
                else if (c == 'i' || c == 'j' || c == 'I' || c == 'J')
                  {
                    if (spec_imag)
-                     cp_error (ec_more_than_one_i_or_j_in_numeric_constant);
+                     error ("more than one `i' or `j' in numeric constant");
                    else if (pedantic)
-                     cp_pedwarn (ec_forbids_imaginary_numeric_constants);
+                     pedwarn ("ANSI C++ forbids imaginary numeric constants");
                    spec_imag = 1;
                  }
                else
@@ -3917,7 +3917,7 @@ real_yylex ()
              if (parts[i])
                warn = 1;
            if (warn)
-             cp_pedwarn (ec_integer_constant_out_of_range);
+             pedwarn ("integer constant out of range");
 
            /* This is simplified by the fact that our constant
               is always positive.  */
@@ -3958,10 +3958,10 @@ real_yylex ()
              type = long_long_unsigned_type_node;
 
            if (!int_fits_type_p (yylval.ttype, type) && !warn)
-             cp_pedwarn (ec_integer_constant_out_of_range);
+             pedwarn ("integer constant out of range");
 
            if (base == 10 && ! spec_unsigned && TREE_UNSIGNED (type))
-             cp_warning (ec_decimal_integer_constant_is_so_large_that_it_is_unsigned);
+             warning ("decimal integer constant is so large that it is unsigned");
 
            if (spec_imag)
              {
@@ -3972,7 +3972,7 @@ real_yylex ()
                                     cp_convert (integer_type_node,
                                                 yylval.ttype));
                else
-                 cp_error (ec_complex_integer_constant_is_too_wide_for_complex_int);
+                 error ("complex integer constant is too wide for `__complex int'");
              }
            else
              TREE_TYPE (yylval.ttype) = type;
@@ -4018,7 +4018,7 @@ real_yylex ()
                  goto tryagain;
                if (width < HOST_BITS_PER_INT
                    && (unsigned) c >= (1 << width))
-                 cp_pedwarn (ec_escape_sequence_out_of_range_for_character);
+                 pedwarn ("escape sequence out of range for character");
 #ifdef MAP_CHARACTER
                if (ISPRINT (c))
                  c = MAP_CHARACTER (c);
@@ -4027,7 +4027,7 @@ real_yylex ()
            else if (c == '\n')
              {
                if (pedantic)
-                 cp_pedwarn (ec_forbids_newline_in_character_constant);
+                 pedwarn ("ANSI C forbids newline in character constant");
                lineno++;
              }
            else
@@ -4076,7 +4076,7 @@ real_yylex ()
                else
                  {
                    if (char_len == -1)
-                     cp_warning (ec_gnoring_invalid_multibyte_character);
+                     warning ("Ignoring invalid multibyte character");
                    if (wide_flag)
                      c = wc;
 #ifdef MAP_CHARACTER
@@ -4110,16 +4110,16 @@ real_yylex ()
          }
 
        if (c != '\'')
-         cp_error (ec_malformatted_character_constant);
+         error ("malformatted character constant");
        else if (chars_seen == 0)
-         cp_error (ec_empty_character_constant);
+         error ("empty character constant");
        else if (num_chars > max_chars)
          {
            num_chars = max_chars;
-           cp_error (ec_character_constant_too_long);
+           error ("character constant too long");
          }
        else if (chars_seen != 1 && warn_multichar)
-         cp_warning (ec_multicharacter_character_constant);
+         warning ("multi-character character constant");
 
        /* If char type is signed, sign-extend the constant.  */
        if (! wide_flag)
@@ -4179,12 +4179,12 @@ real_yylex ()
                  goto skipnewline;
                if (width < HOST_BITS_PER_INT
                    && (unsigned) c >= (1 << width))
-                 cp_warning (ec_escape_sequence_out_of_range_for_character);
+                 warning ("escape sequence out of range for character");
              }
            else if (c == '\n')
              {
                if (pedantic)
-                 cp_pedwarn (ec_forbids_newline_in_string_constant);
+                 pedwarn ("ANSI C++ forbids newline in string constant");
                lineno++;
              }
            else
@@ -4205,7 +4205,7 @@ real_yylex ()
                    c = getch ();
                  }
                if (char_len == -1)
-                 cp_warning (ec_gnoring_invalid_multibyte_character);
+                 warning ("Ignoring invalid multibyte character");
                else
                  {
                    /* mbtowc sometimes needs an extra char before accepting */
@@ -4259,7 +4259,7 @@ real_yylex ()
          skipnewline:
            c = getch ();
            if (c == EOF) {
-               cp_error (ec_nterminated_string);
+               error ("Unterminated string");
                break;
            }
          }
@@ -4408,7 +4408,7 @@ real_yylex ()
                nextchar = c1;
              }
            if (pedantic)
-             cp_pedwarn (ec_use_of_operator_s_is_not_standard,
+             pedwarn ("use of `operator %s' is not standard C++",
                       token_buffer);
            goto done;
          }
@@ -4772,13 +4772,13 @@ handle_cp_pragma (pname)
       token = real_yylex ();
       if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
        {
-         cp_error (ec_invalid_pragma_vtable);
+         error ("invalid #pragma vtable");
          return -1;
        }
 
       if (write_virtuals != 2)
        {
-         cp_warning (ec_use_e2_option_to_enable_pragma_vtable);
+         warning ("use `+e2' option to enable #pragma vtable");
          return -1;
        }
       pending_vtables
@@ -4787,7 +4787,7 @@ handle_cp_pragma (pname)
                          pending_vtables);
       token = real_yylex ();
       if (token != END_OF_LINE)
-       cp_warning (ec_trailing_characters_ignored);
+       warning ("trailing characters ignored");
       return 1;
     }
   else if (! strcmp (pname, "unit"))
@@ -4796,12 +4796,12 @@ handle_cp_pragma (pname)
       token = real_yylex ();
       if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
        {
-         cp_error (ec_invalid_pragma_unit);
+         error ("invalid #pragma unit");
          return -1;
        }
       token = real_yylex ();
       if (token != END_OF_LINE)
-       cp_warning (ec_trailing_characters_ignored);
+       warning ("trailing characters ignored");
       return 1;
     }
   else if (! strcmp (pname, "interface"))
@@ -4818,7 +4818,7 @@ handle_cp_pragma (pname)
          if (token != STRING
              || TREE_CODE (yylval.ttype) != STRING_CST)
            {
-             cp_error (ec_invalid_pragma_interface);
+             error ("invalid `#pragma interface'");
              return -1;
            }
          main_filename = TREE_STRING_POINTER (yylval.ttype);
@@ -4826,7 +4826,7 @@ handle_cp_pragma (pname)
        }
 
       if (token != END_OF_LINE)
-       cp_warning (ec_garbage_after_pragma_interface_ignored);
+       warning ("garbage after `#pragma interface' ignored");
 
 #ifndef NO_LINKAGE_HEURISTICS
       write_virtuals = 3;
@@ -4871,7 +4871,7 @@ handle_cp_pragma (pname)
          if (token != STRING
              || TREE_CODE (yylval.ttype) != STRING_CST)
            {
-             cp_error (ec_invalid_pragma_implementation);
+             error ("invalid `#pragma implementation'");
              return -1;
            }
          main_filename = TREE_STRING_POINTER (yylval.ttype);
@@ -4879,7 +4879,7 @@ handle_cp_pragma (pname)
        }
 
       if (token != END_OF_LINE)
-       cp_warning (ec_garbage_after_pragma_implementation_ignored);
+       warning ("garbage after `#pragma implementation' ignored");
 
 #ifndef NO_LINKAGE_HEURISTICS
       if (write_virtuals == 3)
@@ -4912,7 +4912,7 @@ handle_cp_pragma (pname)
            }
        }
       else
-       cp_error (ec_pragma_implementation_can_only_appear_at_toplevel);
+       error ("`#pragma implementation' can only appear at top-level");
       interface_only = 0;
 #if 1
       /* We make this non-zero so that we infer decl linkage
index 00261a1656930f8878858661fb7c23bfa5f50473..0b7260cf4902e407384dd732756ff201e4e79a42 100644 (file)
@@ -679,7 +679,7 @@ build_overload_value (type, value, in_template)
        REAL_VALUE_TYPE val;
        char *bufp = digit_buffer;
 
-       cp_pedwarn (ec_forbids_floatingpoint_template_arguments);
+       pedwarn ("ANSI C++ forbids floating-point template arguments");
 
        my_friendly_assert (TREE_CODE (value) == REAL_CST, 244);
        val = TREE_REAL_CST (value);
@@ -1814,12 +1814,12 @@ hack_identifier (value, name)
 #ifdef DEAD
              if (DECL_CHAIN (fndecl) == NULL_TREE)
                {
-                 cp_warning (ec_methods_cannot_be_converted_to_function_pointers);
+                 warning ("methods cannot be converted to function pointers");
                  return fndecl;
                }
              else
                {
-                 cp_error (ec_ambiguous_request_for_method_pointer_s,
+                 error ("ambiguous request for method pointer `%s'",
                         IDENTIFIER_POINTER (name));
                  return error_mark_node;
                }
@@ -1840,13 +1840,13 @@ hack_identifier (value, name)
        {
          if (current_function_decl 
              && DECL_STATIC_FUNCTION_P (current_function_decl))
-           cp_error (ec_invalid_use_of_member_in_static_member_function,
+           cp_error ("invalid use of member `%D' in static member function",
                      value);
          else
            /* We can get here when processing a bad default
               argument, like:
                 struct S { int a; void f(int i = a); }  */
-           cp_error (ec_invalid_use_of_member, value);
+           cp_error ("invalid use of member `%D'", value);
 
          return error_mark_node;
        }
@@ -1887,12 +1887,12 @@ hack_identifier (value, name)
     }
   else if (TREE_CODE (value) == NAMESPACE_DECL)
     {
-      cp_error (ec_use_of_namespace_as_expression, value);
+      cp_error ("use of namespace `%D' as expression", value);
       return error_mark_node;
     }
   else if (DECL_CLASS_TEMPLATE_P (value))
     {
-      cp_error (ec_use_of_class_template_as_expression, value);
+      cp_error ("use of class template `%T' as expression", value);
       return error_mark_node;
     }
   else
@@ -1904,10 +1904,10 @@ hack_identifier (value, name)
       if (context != NULL_TREE && context != current_function_decl
          && ! TREE_STATIC (value))
        {
-         cp_error (ec_use_of_s_from_containing_function,
+         cp_error ("use of %s from containing function",
                      (TREE_CODE (value) == VAR_DECL
                       ? "`auto' variable" : "parameter"));
-         cp_error_at (ec_declared_here, value);
+         cp_error_at ("  `%#D' declared here", value);
          value = error_mark_node;
        }
     }
@@ -1930,12 +1930,12 @@ hack_identifier (value, name)
              if (access != access_public_node)
                {
                  if (TREE_CODE (value) == VAR_DECL)
-                   cp_error (ec_static_member_s_is_s,
+                   error ("static member `%s' is %s",
                           IDENTIFIER_POINTER (name),
                           TREE_PRIVATE (value) ? "private"
                                                : "from a private base class");
                  else
-                   cp_error (ec_enum_s_is_from_private_base_class,
+                   error ("enum `%s' is from private base class",
                           IDENTIFIER_POINTER (name));
                  return error_mark_node;
                }
@@ -1946,7 +1946,7 @@ hack_identifier (value, name)
     {
       if (type == 0)
        {
-         cp_error (ec_request_for_member_s_is_ambiguous_in_multiple_inheritance_lattice,
+         error ("request for member `%s' is ambiguous in multiple inheritance lattice",
                 IDENTIFIER_POINTER (name));
          return error_mark_node;
        }
@@ -1992,7 +1992,7 @@ make_thunk (function, delta)
   thunk = IDENTIFIER_GLOBAL_VALUE (thunk_id);
   if (thunk && TREE_CODE (thunk) != THUNK_DECL)
     {
-      cp_error (ec_implementationreserved_name_used, thunk_id);
+      cp_error ("implementation-reserved name `%D' used", thunk_id);
       thunk = NULL_TREE;
       SET_IDENTIFIER_GLOBAL_VALUE (thunk_id, thunk);
     }
@@ -2061,7 +2061,7 @@ emit_thunk (thunk_fndecl)
     tree a, t;
 
     if (varargs_function_p (function))
-      cp_error (ec_generic_thunk_code_fails_for_method_which_uses,
+      cp_error ("generic thunk code fails for method `%#D' which uses `...'",
                function);
 
     /* Set up clone argument trees for the thunk.  */
@@ -2173,7 +2173,7 @@ do_build_copy_constructor (fndecl)
          p = convert_from_reference (p);
 
          if (p == error_mark_node)
-           cp_error (ec_in_default_copy_constructor);
+           cp_error ("in default copy constructor");
          else 
            current_base_init_list = tree_cons (basetype,
                                                p, current_base_init_list);
@@ -2191,7 +2191,7 @@ do_build_copy_constructor (fndecl)
             CONV_IMPLICIT|CONV_CONST, LOOKUP_COMPLAIN, NULL_TREE);
 
          if (p == error_mark_node) 
-           cp_error (ec_in_default_copy_constructor);
+           cp_error ("in default copy constructor");
          else 
            {
              p = convert_from_reference (p);
@@ -2299,17 +2299,17 @@ do_build_assign_ref (fndecl)
          if (TREE_READONLY (field))
            {
              if (DECL_NAME (field))
-               cp_error (ec_nonstatic_const_member_cant_use_default_assignment_operator, field);
+               cp_error ("non-static const member `%#D', can't use default assignment operator", field);
              else
-               cp_error (ec_nonstatic_const_member_in_type_cant_use_default_assignment_operator, current_class_type);
+               cp_error ("non-static const member in type `%T', can't use default assignment operator", current_class_type);
              continue;
            }
          else if (TREE_CODE (TREE_TYPE (field)) == REFERENCE_TYPE)
            {
              if (DECL_NAME (field))
-               cp_error (ec_nonstatic_reference_member_cant_use_default_assignment_operator, field);
+               cp_error ("non-static reference member `%#D', can't use default assignment operator", field);
              else
-               cp_error (ec_nonstatic_reference_member_in_type_cant_use_default_assignment_operator, current_class_type);
+               cp_error ("non-static reference member in type `%T', can't use default assignment operator", current_class_type);
              continue;
            }
 
index 811e24594368e20ddef6af4e5df49284baeec4b3..c73312cd92cb198dad875af26a5702e5cf3b6cad 100644 (file)
@@ -644,89 +644,89 @@ static const short yyrline[] = { 0,
    373,   377,   380,   384,   387,   389,   391,   394,   396,   399,
    402,   404,   406,   408,   410,   411,   413,   414,   418,   421,
    430,   433,   435,   439,   442,   444,   448,   451,   463,   470,
-   478,   480,   481,   483,   487,   490,   497,   500,   502,   507,
-   510,   514,   517,   520,   523,   527,   532,   542,   544,   546,
-   548,   550,   563,   566,   570,   573,   575,   577,   580,   583,
-   587,   589,   591,   593,   598,   600,   602,   604,   606,   607,
-   614,   615,   616,   619,   622,   626,   628,   629,   632,   634,
-   637,   640,   642,   646,   649,   651,   655,   657,   659,   663,
-   665,   667,   671,   673,   675,   681,   685,   688,   691,   694,
-   699,   702,   704,   706,   712,   722,   724,   727,   730,   732,
-   735,   739,   748,   751,   753,   757,   770,   790,   793,   795,
-   796,   799,   806,   812,   814,   816,   818,   820,   823,   828,
-   830,   831,   832,   833,   836,   838,   839,   842,   844,   845,
-   848,   853,   853,   857,   857,   860,   860,   863,   863,   867,
-   867,   872,   872,   875,   875,   878,   880,   883,   890,   894,
-   897,   900,   906,   915,   917,   925,   928,   931,   934,   938,
-   941,   943,   946,   949,   951,   953,   955,   959,   962,   965,
-   970,   974,   979,   983,   986,   987,   991,  1010,  1017,  1020,
-  1022,  1023,  1024,  1027,  1031,  1032,  1036,  1040,  1043,  1045,
-  1049,  1052,  1055,  1059,  1062,  1064,  1066,  1068,  1071,  1075,
-  1077,  1079,  1081,  1087,  1090,  1093,  1096,  1108,  1113,  1117,
-  1121,  1126,  1128,  1132,  1136,  1138,  1147,  1151,  1154,  1157,
-  1162,  1165,  1167,  1175,  1188,  1193,  1199,  1201,  1203,  1216,
-  1219,  1221,  1223,  1225,  1227,  1229,  1231,  1233,  1235,  1237,
-  1239,  1241,  1243,  1245,  1247,  1249,  1251,  1253,  1255,  1257,
-  1259,  1263,  1265,  1267,  1284,  1287,  1289,  1290,  1291,  1292,
-  1293,  1296,  1299,  1302,  1306,  1309,  1311,  1316,  1318,  1319,
-  1322,  1324,  1326,  1328,  1332,  1335,  1339,  1343,  1344,  1345,
-  1349,  1357,  1358,  1359,  1373,  1375,  1378,  1380,  1391,  1396,
-  1398,  1400,  1402,  1404,  1406,  1408,  1411,  1413,  1457,  1458,
-  1462,  1466,  1470,  1474,  1476,  1480,  1482,  1484,  1492,  1494,
-  1496,  1498,  1502,  1504,  1506,  1508,  1513,  1515,  1517,  1519,
-  1522,  1524,  1526,  1570,  1573,  1577,  1580,  1584,  1587,  1592,
-  1594,  1598,  1611,  1614,  1621,  1628,  1633,  1635,  1640,  1642,
-  1649,  1651,  1655,  1659,  1665,  1669,  1672,  1675,  1678,  1688,
-  1690,  1693,  1697,  1700,  1703,  1706,  1709,  1715,  1721,  1723,
-  1728,  1730,  1739,  1742,  1744,  1747,  1753,  1755,  1765,  1769,
-  1772,  1775,  1780,  1783,  1791,  1793,  1795,  1797,  1800,  1803,
-  1818,  1837,  1840,  1842,  1845,  1847,  1850,  1852,  1855,  1857,
-  1860,  1863,  1867,  1873,  1874,  1886,  1893,  1896,  1902,  1906,
-  1911,  1917,  1918,  1926,  1929,  1933,  1936,  1940,  1945,  1948,
-  1952,  1955,  1957,  1959,  1961,  1968,  1970,  1971,  1972,  1976,
-  1979,  1983,  1986,  1992,  1994,  1997,  2000,  2003,  2009,  2012,
-  2015,  2017,  2019,  2023,  2029,  2037,  2039,  2043,  2045,  2050,
-  2053,  2056,  2058,  2060,  2064,  2069,  2076,  2080,  2084,  2091,
-  2095,  2098,  2101,  2107,  2119,  2121,  2124,  2144,  2146,  2149,
-  2151,  2156,  2158,  2160,  2162,  2164,  2166,  2170,  2175,  2178,
-  2180,  2184,  2190,  2195,  2200,  2202,  2206,  2211,  2214,  2221,
-  2238,  2244,  2246,  2249,  2252,  2254,  2258,  2260,  2264,  2269,
-  2275,  2278,  2279,  2300,  2323,  2325,  2329,  2340,  2354,  2359,
-  2366,  2369,  2377,  2388,  2397,  2401,  2416,  2419,  2424,  2426,
-  2428,  2430,  2432,  2434,  2437,  2439,  2443,  2449,  2451,  2454,
-  2457,  2459,  2470,  2475,  2478,  2483,  2486,  2487,  2498,  2501,
-  2502,  2513,  2515,  2518,  2520,  2523,  2530,  2538,  2545,  2551,
-  2557,  2565,  2569,  2574,  2578,  2581,  2590,  2592,  2596,  2599,
-  2604,  2608,  2614,  2625,  2628,  2632,  2636,  2644,  2649,  2655,
-  2658,  2660,  2662,  2668,  2671,  2673,  2675,  2677,  2681,  2684,
-  2702,  2712,  2714,  2715,  2719,  2724,  2727,  2729,  2731,  2733,
-  2737,  2743,  2746,  2748,  2750,  2752,  2756,  2759,  2762,  2764,
-  2766,  2768,  2772,  2775,  2778,  2780,  2782,  2784,  2786,  2793,
-  2797,  2802,  2806,  2811,  2813,  2817,  2820,  2822,  2825,  2827,
-  2828,  2831,  2833,  2835,  2841,  2856,  2862,  2868,  2882,  2884,
-  2888,  2902,  2904,  2906,  2910,  2916,  2929,  2931,  2935,  2948,
-  2954,  2956,  2957,  2958,  2966,  2971,  2980,  2981,  2985,  2988,
-  2994,  3000,  3003,  3005,  3007,  3009,  3013,  3017,  3021,  3024,
-  3029,  3032,  3034,  3036,  3038,  3040,  3042,  3044,  3046,  3050,
-  3054,  3058,  3062,  3063,  3065,  3067,  3069,  3071,  3073,  3075,
-  3077,  3079,  3087,  3089,  3090,  3091,  3094,  3100,  3102,  3107,
-  3109,  3112,  3126,  3129,  3132,  3136,  3139,  3146,  3148,  3151,
-  3153,  3155,  3158,  3161,  3164,  3167,  3169,  3172,  3176,  3178,
-  3184,  3186,  3187,  3189,  3194,  3196,  3198,  3200,  3202,  3205,
-  3206,  3208,  3211,  3212,  3215,  3215,  3218,  3218,  3221,  3221,
-  3223,  3225,  3227,  3229,  3235,  3241,  3244,  3247,  3253,  3255,
-  3257,  3261,  3263,  3264,  3265,  3267,  3270,  3277,  3282,  3290,
-  3294,  3296,  3299,  3301,  3304,  3308,  3310,  3313,  3315,  3318,
-  3335,  3341,  3349,  3351,  3353,  3357,  3360,  3361,  3369,  3373,
-  3377,  3380,  3381,  3387,  3390,  3393,  3395,  3399,  3404,  3407,
-  3417,  3422,  3423,  3430,  3433,  3436,  3438,  3441,  3443,  3453,
-  3467,  3471,  3474,  3476,  3480,  3484,  3487,  3490,  3492,  3496,
-  3498,  3505,  3512,  3515,  3518,  3522,  3526,  3532,  3536,  3541,
-  3543,  3546,  3551,  3557,  3570,  3573,  3575,  3579,  3584,  3586,
-  3593,  3596,  3598,  3600,  3606,  3611,  3614,  3616,  3618,  3620,
-  3622,  3624,  3626,  3628,  3630,  3632,  3634,  3636,  3638,  3640,
-  3642,  3644,  3646,  3648,  3650,  3652,  3654,  3656,  3658,  3660,
-  3662,  3664,  3666,  3668,  3670,  3672,  3674,  3676,  3679,  3681
+   478,   480,   481,   483,   487,   490,   496,   499,   501,   506,
+   509,   513,   516,   519,   522,   526,   531,   541,   543,   545,
+   547,   549,   562,   565,   569,   572,   574,   576,   579,   582,
+   586,   588,   590,   592,   597,   599,   601,   603,   605,   606,
+   613,   614,   615,   618,   621,   625,   627,   628,   631,   633,
+   636,   639,   641,   645,   648,   650,   654,   656,   658,   662,
+   664,   666,   670,   672,   674,   680,   684,   687,   690,   693,
+   698,   701,   703,   705,   711,   721,   723,   726,   729,   731,
+   734,   738,   747,   750,   752,   756,   769,   789,   792,   794,
+   795,   798,   805,   811,   813,   815,   817,   819,   822,   827,
+   829,   830,   831,   832,   835,   837,   838,   841,   843,   844,
+   847,   852,   852,   856,   856,   859,   859,   862,   862,   866,
+   866,   871,   871,   874,   874,   877,   879,   882,   889,   893,
+   896,   899,   905,   914,   916,   924,   927,   930,   933,   937,
+   940,   942,   945,   948,   950,   952,   954,   958,   961,   964,
+   969,   973,   978,   982,   985,   986,   990,  1009,  1016,  1019,
+  1021,  1022,  1023,  1026,  1030,  1031,  1035,  1039,  1042,  1044,
+  1048,  1051,  1054,  1058,  1061,  1063,  1065,  1067,  1070,  1074,
+  1076,  1078,  1080,  1086,  1089,  1092,  1095,  1107,  1112,  1116,
+  1120,  1125,  1127,  1131,  1135,  1137,  1146,  1150,  1153,  1156,
+  1161,  1164,  1166,  1174,  1187,  1192,  1198,  1200,  1202,  1215,
+  1218,  1220,  1222,  1224,  1226,  1228,  1230,  1232,  1234,  1236,
+  1238,  1240,  1242,  1244,  1246,  1248,  1250,  1252,  1254,  1256,
+  1258,  1262,  1264,  1266,  1283,  1286,  1288,  1289,  1290,  1291,
+  1292,  1295,  1298,  1301,  1305,  1308,  1310,  1315,  1317,  1318,
+  1321,  1323,  1325,  1327,  1331,  1334,  1338,  1342,  1343,  1344,
+  1348,  1356,  1357,  1358,  1372,  1374,  1377,  1379,  1390,  1395,
+  1397,  1399,  1401,  1403,  1405,  1407,  1410,  1412,  1456,  1457,
+  1461,  1465,  1469,  1473,  1475,  1479,  1481,  1483,  1491,  1493,
+  1495,  1497,  1501,  1503,  1505,  1507,  1512,  1514,  1516,  1518,
+  1521,  1523,  1525,  1569,  1572,  1576,  1579,  1583,  1586,  1591,
+  1593,  1597,  1610,  1613,  1620,  1627,  1632,  1634,  1639,  1641,
+  1648,  1650,  1654,  1658,  1664,  1668,  1671,  1674,  1677,  1687,
+  1689,  1692,  1696,  1699,  1702,  1705,  1708,  1714,  1720,  1722,
+  1727,  1729,  1738,  1741,  1743,  1746,  1752,  1754,  1764,  1768,
+  1771,  1774,  1779,  1782,  1790,  1792,  1794,  1796,  1799,  1802,
+  1817,  1836,  1839,  1841,  1844,  1846,  1849,  1851,  1854,  1856,
+  1859,  1862,  1866,  1872,  1873,  1885,  1892,  1895,  1901,  1905,
+  1910,  1916,  1917,  1925,  1928,  1932,  1935,  1939,  1944,  1947,
+  1951,  1954,  1956,  1958,  1960,  1967,  1969,  1970,  1971,  1975,
+  1978,  1982,  1985,  1991,  1993,  1996,  1999,  2002,  2008,  2011,
+  2014,  2016,  2018,  2022,  2028,  2036,  2038,  2042,  2044,  2049,
+  2052,  2055,  2057,  2059,  2063,  2068,  2075,  2079,  2083,  2090,
+  2094,  2097,  2100,  2106,  2118,  2120,  2123,  2143,  2145,  2148,
+  2150,  2155,  2157,  2159,  2161,  2163,  2165,  2169,  2174,  2177,
+  2179,  2183,  2189,  2194,  2199,  2201,  2205,  2210,  2213,  2220,
+  2237,  2243,  2245,  2248,  2251,  2253,  2257,  2259,  2263,  2268,
+  2274,  2277,  2278,  2299,  2322,  2324,  2328,  2339,  2353,  2358,
+  2365,  2368,  2376,  2387,  2396,  2400,  2415,  2418,  2423,  2425,
+  2427,  2429,  2431,  2433,  2436,  2438,  2442,  2448,  2450,  2453,
+  2456,  2458,  2469,  2474,  2477,  2482,  2485,  2486,  2497,  2500,
+  2501,  2512,  2514,  2517,  2519,  2522,  2529,  2537,  2544,  2550,
+  2556,  2564,  2568,  2573,  2577,  2580,  2589,  2591,  2595,  2598,
+  2603,  2607,  2613,  2624,  2627,  2631,  2635,  2643,  2648,  2654,
+  2657,  2659,  2661,  2667,  2670,  2672,  2674,  2676,  2680,  2683,
+  2701,  2711,  2713,  2714,  2718,  2723,  2726,  2728,  2730,  2732,
+  2736,  2742,  2745,  2747,  2749,  2751,  2755,  2758,  2761,  2763,
+  2765,  2767,  2771,  2774,  2777,  2779,  2781,  2783,  2785,  2792,
+  2796,  2801,  2805,  2810,  2812,  2816,  2819,  2821,  2824,  2826,
+  2827,  2830,  2832,  2834,  2840,  2855,  2861,  2867,  2881,  2883,
+  2887,  2901,  2903,  2905,  2909,  2915,  2928,  2930,  2934,  2947,
+  2953,  2955,  2956,  2957,  2965,  2970,  2979,  2980,  2984,  2987,
+  2993,  2999,  3002,  3004,  3006,  3008,  3012,  3016,  3020,  3023,
+  3028,  3031,  3033,  3035,  3037,  3039,  3041,  3043,  3045,  3049,
+  3053,  3057,  3061,  3062,  3064,  3066,  3068,  3070,  3072,  3074,
+  3076,  3078,  3086,  3088,  3089,  3090,  3093,  3099,  3101,  3106,
+  3108,  3111,  3125,  3128,  3131,  3135,  3138,  3145,  3147,  3150,
+  3152,  3154,  3157,  3160,  3163,  3166,  3168,  3171,  3175,  3177,
+  3183,  3185,  3186,  3188,  3193,  3195,  3197,  3199,  3201,  3204,
+  3205,  3207,  3210,  3211,  3214,  3214,  3217,  3217,  3220,  3220,
+  3222,  3224,  3226,  3228,  3234,  3240,  3243,  3246,  3252,  3254,
+  3256,  3260,  3262,  3263,  3264,  3266,  3269,  3276,  3281,  3289,
+  3293,  3295,  3298,  3300,  3303,  3307,  3309,  3312,  3314,  3317,
+  3334,  3340,  3348,  3350,  3352,  3356,  3359,  3360,  3368,  3372,
+  3376,  3379,  3380,  3386,  3389,  3392,  3394,  3398,  3403,  3406,
+  3416,  3421,  3422,  3429,  3432,  3435,  3437,  3440,  3442,  3452,
+  3466,  3470,  3473,  3475,  3479,  3483,  3486,  3489,  3491,  3495,
+  3497,  3504,  3511,  3514,  3517,  3521,  3525,  3531,  3535,  3540,
+  3542,  3545,  3550,  3556,  3567,  3570,  3572,  3576,  3581,  3583,
+  3590,  3593,  3595,  3597,  3603,  3608,  3611,  3613,  3615,  3617,
+  3619,  3621,  3623,  3625,  3627,  3629,  3631,  3633,  3635,  3637,
+  3639,  3641,  3643,  3645,  3647,  3649,  3651,  3653,  3655,  3657,
+  3659,  3661,  3663,  3665,  3667,  3669,  3671,  3673,  3676,  3678
 };
 #endif
 
@@ -4270,145 +4270,144 @@ case 45:
 case 46:
 #line 491 "parse.y"
 { if (current_lang_name != yyvsp[0].ttype)
-                   cp_error
-                     (ec_use_of_linkage_spec_is_different_from_previous_spec, yyvsp[0].ttype, current_lang_name); 
+                   cp_error ("use of linkage spec `%D' is different from previous spec `%D'", yyvsp[0].ttype, current_lang_name);
                  pop_lang_context (); push_lang_context (yyvsp[0].ttype); ;
     break;}
 case 47:
-#line 499 "parse.y"
+#line 498 "parse.y"
 { begin_template_parm_list (); ;
     break;}
 case 48:
-#line 501 "parse.y"
+#line 500 "parse.y"
 { yyval.ttype = end_template_parm_list (yyvsp[-1].ttype); ;
     break;}
 case 49:
-#line 503 "parse.y"
+#line 502 "parse.y"
 { begin_specialization(); 
                  yyval.ttype = NULL_TREE; ;
     break;}
 case 50:
-#line 509 "parse.y"
+#line 508 "parse.y"
 { yyval.ttype = process_template_parm (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 51:
-#line 511 "parse.y"
+#line 510 "parse.y"
 { yyval.ttype = process_template_parm (yyvsp[-2].ttype, yyvsp[0].ttype); ;
     break;}
 case 52:
-#line 516 "parse.y"
+#line 515 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 53:
-#line 518 "parse.y"
+#line 517 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 54:
-#line 522 "parse.y"
+#line 521 "parse.y"
 { yyval.ttype = finish_template_type_parm (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 55:
-#line 524 "parse.y"
+#line 523 "parse.y"
 { yyval.ttype = finish_template_type_parm (class_type_node, yyvsp[0].ttype); ;
     break;}
 case 56:
-#line 529 "parse.y"
+#line 528 "parse.y"
 { yyval.ttype = finish_template_template_parm (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 57:
-#line 541 "parse.y"
+#line 540 "parse.y"
 { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 58:
-#line 543 "parse.y"
+#line 542 "parse.y"
 { yyval.ttype = build_tree_list (groktypename (yyvsp[0].ftype.t), yyvsp[-2].ttype); ;
     break;}
 case 59:
-#line 545 "parse.y"
+#line 544 "parse.y"
 { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); ;
     break;}
 case 60:
-#line 547 "parse.y"
+#line 546 "parse.y"
 { yyval.ttype = build_tree_list (yyvsp[0].ttype, yyvsp[-2].ftype.t); ;
     break;}
 case 61:
-#line 549 "parse.y"
+#line 548 "parse.y"
 { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 62:
-#line 551 "parse.y"
+#line 550 "parse.y"
 {
                  if (TREE_CODE (yyvsp[0].ttype) != TEMPLATE_DECL
                      && TREE_CODE (yyvsp[0].ttype) != TEMPLATE_TEMPLATE_PARM
                      && TREE_CODE (yyvsp[0].ttype) != TYPE_DECL)
                    {
-                     cp_error (ec_invalid_default_template_argument);
+                     error ("invalid default template argument");
                      yyvsp[0].ttype = error_mark_node;
                    }
                  yyval.ttype = build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype);
                ;
     break;}
 case 63:
-#line 565 "parse.y"
+#line 564 "parse.y"
 { finish_template_decl (yyvsp[-1].ttype); ;
     break;}
 case 64:
-#line 567 "parse.y"
+#line 566 "parse.y"
 { finish_template_decl (yyvsp[-1].ttype); ;
     break;}
 case 65:
-#line 572 "parse.y"
+#line 571 "parse.y"
 { if (pending_inlines) do_pending_inlines (); ;
     break;}
 case 66:
-#line 574 "parse.y"
+#line 573 "parse.y"
 { if (pending_inlines) do_pending_inlines (); ;
     break;}
 case 67:
-#line 576 "parse.y"
+#line 575 "parse.y"
 { if (pending_inlines) do_pending_inlines (); ;
     break;}
 case 68:
-#line 578 "parse.y"
+#line 577 "parse.y"
 { if (pending_inlines) do_pending_inlines ();
                  pop_lang_context (); ;
     break;}
 case 69:
-#line 581 "parse.y"
+#line 580 "parse.y"
 { if (pending_inlines) do_pending_inlines ();
                  pop_lang_context (); ;
     break;}
 case 70:
-#line 584 "parse.y"
+#line 583 "parse.y"
 { pedantic = yyvsp[-1].itype; ;
     break;}
 case 72:
-#line 590 "parse.y"
+#line 589 "parse.y"
 {;
     break;}
 case 73:
-#line 592 "parse.y"
+#line 591 "parse.y"
 { note_list_got_semicolon (yyvsp[-2].ftype.t); ;
     break;}
 case 74:
-#line 594 "parse.y"
+#line 593 "parse.y"
 { maybe_process_partial_specialization (yyvsp[-1].ftype.t);
                  note_got_semicolon (yyvsp[-1].ftype.t); ;
     break;}
 case 76:
-#line 601 "parse.y"
+#line 600 "parse.y"
 {;
     break;}
 case 77:
-#line 603 "parse.y"
+#line 602 "parse.y"
 { note_list_got_semicolon (yyvsp[-2].ftype.t); ;
     break;}
 case 78:
-#line 605 "parse.y"
-{ cp_pedwarn (ec_empty_declaration); ;
+#line 604 "parse.y"
+{ pedwarn ("empty declaration"); ;
     break;}
 case 80:
-#line 608 "parse.y"
+#line 607 "parse.y"
 {
                  tree t, attrs;
                  split_specs_attrs (yyvsp[-1].ftype.t, &t, &attrs);
@@ -4417,124 +4416,124 @@ case 80:
                ;
     break;}
 case 84:
-#line 621 "parse.y"
+#line 620 "parse.y"
 { yyval.itype = 0; ;
     break;}
 case 85:
-#line 623 "parse.y"
+#line 622 "parse.y"
 { yyval.itype = 1; ;
     break;}
 case 91:
-#line 639 "parse.y"
+#line 638 "parse.y"
 { finish_function (lineno, (int)yyvsp[-1].itype, 0); ;
     break;}
 case 92:
-#line 641 "parse.y"
+#line 640 "parse.y"
 { ;
     break;}
 case 93:
-#line 643 "parse.y"
+#line 642 "parse.y"
 { ;
     break;}
 case 94:
-#line 648 "parse.y"
+#line 647 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 95:
-#line 650 "parse.y"
+#line 649 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 96:
-#line 652 "parse.y"
+#line 651 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype); 
                  yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype);
                ;
     break;}
 case 97:
-#line 656 "parse.y"
+#line 655 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 98:
-#line 658 "parse.y"
+#line 657 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 99:
-#line 660 "parse.y"
+#line 659 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype);
                  yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype);
                ;
     break;}
 case 100:
-#line 664 "parse.y"
+#line 663 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 101:
-#line 666 "parse.y"
+#line 665 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 102:
-#line 668 "parse.y"
+#line 667 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype);
                  yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype);
                ;
     break;}
 case 103:
-#line 672 "parse.y"
+#line 671 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 104:
-#line 674 "parse.y"
+#line 673 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 105:
-#line 676 "parse.y"
+#line 675 "parse.y"
 { yyval.ttype = begin_constructor_declarator (yyvsp[-4].ttype, yyvsp[-3].ttype); 
                  yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype);
                ;
     break;}
 case 106:
-#line 683 "parse.y"
+#line 682 "parse.y"
 { if (!begin_function_definition (yyvsp[-1].ftype.t, yyvsp[0].ttype))
                    YYERROR1; ;
     break;}
 case 107:
-#line 686 "parse.y"
+#line 685 "parse.y"
 { if (!begin_function_definition (yyvsp[-1].ttype, yyvsp[0].ttype))
                    YYERROR1; ;
     break;}
 case 108:
-#line 689 "parse.y"
+#line 688 "parse.y"
 { if (!begin_function_definition (NULL_TREE, yyvsp[0].ttype))
                    YYERROR1; ;
     break;}
 case 109:
-#line 692 "parse.y"
+#line 691 "parse.y"
 { if (!begin_function_definition (yyvsp[-1].ttype, yyvsp[0].ttype))
                    YYERROR1; ;
     break;}
 case 110:
-#line 695 "parse.y"
+#line 694 "parse.y"
 { if (!begin_function_definition (NULL_TREE, yyvsp[0].ttype))
                    YYERROR1; ;
     break;}
 case 111:
-#line 701 "parse.y"
+#line 700 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-5].ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 112:
-#line 703 "parse.y"
+#line 702 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-3].ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 113:
-#line 705 "parse.y"
+#line 704 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-5].ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 114:
-#line 707 "parse.y"
+#line 706 "parse.y"
 { yyval.ttype = make_call_declarator (yyvsp[-3].ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 115:
-#line 714 "parse.y"
+#line 713 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ttype);
                  yyval.ttype = start_method (specs, yyvsp[0].ttype);
                 rest_of_mdef:
@@ -4545,34 +4544,34 @@ case 115:
                  reinit_parse_for_method (yychar, yyval.ttype); ;
     break;}
 case 116:
-#line 723 "parse.y"
+#line 722 "parse.y"
 { yyval.ttype = start_method (NULL_TREE, yyvsp[0].ttype); goto rest_of_mdef; ;
     break;}
 case 117:
-#line 725 "parse.y"
+#line 724 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ftype.t);
                  yyval.ttype = start_method (specs, yyvsp[0].ttype); goto rest_of_mdef; ;
     break;}
 case 118:
-#line 728 "parse.y"
+#line 727 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ttype);
                  yyval.ttype = start_method (specs, yyvsp[0].ttype); goto rest_of_mdef; ;
     break;}
 case 119:
-#line 731 "parse.y"
+#line 730 "parse.y"
 { yyval.ttype = start_method (NULL_TREE, yyval.ttype); goto rest_of_mdef; ;
     break;}
 case 120:
-#line 733 "parse.y"
+#line 732 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ttype);
                  yyval.ttype = start_method (specs, yyvsp[0].ttype); goto rest_of_mdef; ;
     break;}
 case 121:
-#line 736 "parse.y"
+#line 735 "parse.y"
 { yyval.ttype = start_method (NULL_TREE, yyval.ttype); goto rest_of_mdef; ;
     break;}
 case 122:
-#line 741 "parse.y"
+#line 740 "parse.y"
 {
                  if (! current_function_parms_stored)
                    store_parm_decls ();
@@ -4580,22 +4579,22 @@ case 122:
                ;
     break;}
 case 123:
-#line 750 "parse.y"
+#line 749 "parse.y"
 { store_return_init (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 124:
-#line 752 "parse.y"
+#line 751 "parse.y"
 { store_return_init (yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 125:
-#line 754 "parse.y"
+#line 753 "parse.y"
 { store_return_init (yyval.ttype, NULL_TREE); ;
     break;}
 case 126:
-#line 759 "parse.y"
+#line 758 "parse.y"
 {
                  if (yyvsp[0].itype == 0)
-                   cp_error (ec_no_base_initializers_given_following);
+                   error ("no base initializers given following ':'");
                  setup_vtbl_ptr ();
                  /* Always keep the BLOCK node associated with the outermost
                     pair of curley braces of a function.  These are needed
@@ -4604,7 +4603,7 @@ case 126:
                ;
     break;}
 case 127:
-#line 772 "parse.y"
+#line 771 "parse.y"
 {
                  if (! current_function_parms_stored)
                    store_parm_decls ();
@@ -4617,119 +4616,119 @@ case 127:
                      expand_start_bindings (0);
                    }
                  else if (current_class_type == NULL_TREE)
-                   cp_error (ec_base_initializers_not_allowed_for_nonmember_functions);
+                   error ("base initializers not allowed for non-member functions");
                  else if (! DECL_CONSTRUCTOR_P (current_function_decl))
-                   cp_error (ec_only_constructors_take_base_initializers);
+                   error ("only constructors take base initializers");
                ;
     break;}
 case 128:
-#line 792 "parse.y"
+#line 791 "parse.y"
 { yyval.itype = 0; ;
     break;}
 case 129:
-#line 794 "parse.y"
+#line 793 "parse.y"
 { yyval.itype = 1; ;
     break;}
 case 132:
-#line 801 "parse.y"
+#line 800 "parse.y"
 {
                  if (current_class_name)
-                   cp_pedwarn (ec_anachronistic_old_style_base_class_initializer);
+                   pedwarn ("anachronistic old style base class initializer");
                  expand_member_init (current_class_ref, NULL_TREE, yyvsp[-1].ttype);
                ;
     break;}
 case 133:
-#line 807 "parse.y"
+#line 806 "parse.y"
 {
                  if (current_class_name)
-                   cp_pedwarn (ec_anachronistic_old_style_base_class_initializer);
+                   pedwarn ("anachronistic old style base class initializer");
                  expand_member_init (current_class_ref, NULL_TREE, void_type_node);
                ;
     break;}
 case 134:
-#line 813 "parse.y"
+#line 812 "parse.y"
 { expand_member_init (current_class_ref, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 135:
-#line 815 "parse.y"
+#line 814 "parse.y"
 { expand_member_init (current_class_ref, yyvsp[-1].ttype, void_type_node); ;
     break;}
 case 136:
-#line 817 "parse.y"
+#line 816 "parse.y"
 { expand_member_init (current_class_ref, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 137:
-#line 819 "parse.y"
+#line 818 "parse.y"
 { expand_member_init (current_class_ref, yyvsp[-1].ttype, void_type_node); ;
     break;}
 case 138:
-#line 821 "parse.y"
+#line 820 "parse.y"
 { expand_member_init (current_class_ref, TYPE_MAIN_DECL (yyvsp[-3].ttype),
                                      yyvsp[-1].ttype); ;
     break;}
 case 139:
-#line 824 "parse.y"
+#line 823 "parse.y"
 { expand_member_init (current_class_ref, TYPE_MAIN_DECL (yyvsp[-1].ttype),
                                      void_type_node); ;
     break;}
 case 151:
-#line 850 "parse.y"
+#line 849 "parse.y"
 { do_type_instantiation (yyvsp[-1].ftype.t, NULL_TREE);
                  yyungetc (';', 1); ;
     break;}
 case 153:
-#line 854 "parse.y"
+#line 853 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ftype.t);
                  do_decl_instantiation (specs, yyvsp[0].ttype, NULL_TREE); ;
     break;}
 case 155:
-#line 858 "parse.y"
+#line 857 "parse.y"
 { do_decl_instantiation (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
     break;}
 case 157:
-#line 861 "parse.y"
+#line 860 "parse.y"
 { do_decl_instantiation (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ;
     break;}
 case 159:
-#line 864 "parse.y"
+#line 863 "parse.y"
 { do_type_instantiation (yyvsp[-1].ftype.t, yyvsp[-4].ttype);
                  yyungetc (';', 1); ;
     break;}
 case 161:
-#line 869 "parse.y"
+#line 868 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ftype.t);
                  do_decl_instantiation (specs, yyvsp[0].ttype, yyvsp[-4].ttype); ;
     break;}
 case 163:
-#line 873 "parse.y"
+#line 872 "parse.y"
 { do_decl_instantiation (NULL_TREE, yyvsp[0].ttype, yyvsp[-3].ttype); ;
     break;}
 case 165:
-#line 876 "parse.y"
+#line 875 "parse.y"
 { do_decl_instantiation (NULL_TREE, yyvsp[0].ttype, yyvsp[-3].ttype); ;
     break;}
 case 167:
-#line 881 "parse.y"
+#line 880 "parse.y"
 { begin_explicit_instantiation(); ;
     break;}
 case 168:
-#line 884 "parse.y"
+#line 883 "parse.y"
 { end_explicit_instantiation(); ;
     break;}
 case 169:
-#line 893 "parse.y"
+#line 892 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 170:
-#line 896 "parse.y"
+#line 895 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 172:
-#line 903 "parse.y"
+#line 902 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 173:
-#line 907 "parse.y"
+#line 906 "parse.y"
 { 
                  if (yychar == YYEMPTY)
                    yychar = YYLEX;
@@ -4739,96 +4738,96 @@ case 173:
                ;
     break;}
 case 175:
-#line 918 "parse.y"
+#line 917 "parse.y"
 {
                  /* Handle `Class<Class<Type>>' without space in the `>>' */
-                 cp_pedwarn (ec_should_be_in_template_class_name);
+                 pedwarn ("`>>' should be `> >' in template class name");
                  yyungetc ('>', 1);
                ;
     break;}
 case 176:
-#line 927 "parse.y"
+#line 926 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 178:
-#line 933 "parse.y"
+#line 932 "parse.y"
 { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ;
     break;}
 case 179:
-#line 935 "parse.y"
+#line 934 "parse.y"
 { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
     break;}
 case 180:
-#line 940 "parse.y"
+#line 939 "parse.y"
 { yyval.ttype = groktypename (yyvsp[0].ftype.t); ;
     break;}
 case 181:
-#line 942 "parse.y"
+#line 941 "parse.y"
 { yyval.ttype = lastiddecl; ;
     break;}
 case 183:
-#line 948 "parse.y"
+#line 947 "parse.y"
 { yyval.code = NEGATE_EXPR; ;
     break;}
 case 184:
-#line 950 "parse.y"
+#line 949 "parse.y"
 { yyval.code = CONVERT_EXPR; ;
     break;}
 case 185:
-#line 952 "parse.y"
+#line 951 "parse.y"
 { yyval.code = PREINCREMENT_EXPR; ;
     break;}
 case 186:
-#line 954 "parse.y"
+#line 953 "parse.y"
 { yyval.code = PREDECREMENT_EXPR; ;
     break;}
 case 187:
-#line 956 "parse.y"
+#line 955 "parse.y"
 { yyval.code = TRUTH_NOT_EXPR; ;
     break;}
 case 188:
-#line 961 "parse.y"
+#line 960 "parse.y"
 { yyval.ttype = build_x_compound_expr (yyval.ttype); ;
     break;}
 case 190:
-#line 967 "parse.y"
-{ cp_error (ec_forbids_an_empty_condition_for_s,
+#line 966 "parse.y"
+{ error ("ANSI C++ forbids an empty condition for `%s'",
                         cond_stmt_keyword);
                  yyval.ttype = integer_zero_node; ;
     break;}
 case 191:
-#line 971 "parse.y"
+#line 970 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 192:
-#line 976 "parse.y"
-{ cp_error (ec_forbids_an_empty_condition_for_s,
+#line 975 "parse.y"
+{ error ("ANSI C++ forbids an empty condition for `%s'",
                         cond_stmt_keyword);
                  yyval.ttype = integer_zero_node; ;
     break;}
 case 193:
-#line 980 "parse.y"
+#line 979 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 194:
-#line 985 "parse.y"
+#line 984 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 196:
-#line 988 "parse.y"
+#line 987 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 197:
-#line 993 "parse.y"
+#line 992 "parse.y"
 { {
                  tree d;
                  for (d = getdecls (); d; d = TREE_CHAIN (d))
                    if (TREE_CODE (d) == TYPE_DECL) {
                      tree s = TREE_TYPE (d);
                      if (TREE_CODE (s) == RECORD_TYPE)
-                       cp_error (ec_definition_of_class_in_condition, s);
+                       cp_error ("definition of class `%T' in condition", s);
                      else if (TREE_CODE (s) == ENUMERAL_TYPE)
-                       cp_error (ec_definition_of_enum_in_condition, s);
+                       cp_error ("definition of enum `%T' in condition", s);
                    }
                  }
                  current_declspecs = yyvsp[-4].ftype.t;
@@ -4838,195 +4837,195 @@ case 197:
                ;
     break;}
 case 198:
-#line 1010 "parse.y"
+#line 1009 "parse.y"
 { 
                  cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-3].ttype, 1, LOOKUP_ONLYCONVERTING);
                  resume_momentary (yyvsp[-2].itype);
                  yyval.ttype = yyvsp[-1].ttype; 
                  if (TREE_CODE (TREE_TYPE (yyval.ttype)) == ARRAY_TYPE)
-                   cp_error (ec_definition_of_array_in_condition, yyval.ttype); 
+                   cp_error ("definition of array `%#D' in condition", yyval.ttype); 
                ;
     break;}
 case 204:
-#line 1029 "parse.y"
+#line 1028 "parse.y"
 { yyval.ttype = begin_compound_stmt (1); ;
     break;}
 case 205:
-#line 1031 "parse.y"
+#line 1030 "parse.y"
 { finish_compound_stmt (1, yyvsp[-1].ttype); ;
     break;}
 case 207:
-#line 1038 "parse.y"
+#line 1037 "parse.y"
 { yyval.ttype = expr_tree_cons (NULL_TREE, yyval.ttype, 
                                  build_expr_list (NULL_TREE, yyvsp[0].ttype)); ;
     break;}
 case 208:
-#line 1041 "parse.y"
+#line 1040 "parse.y"
 { yyval.ttype = expr_tree_cons (NULL_TREE, yyval.ttype, 
                                  build_expr_list (NULL_TREE, error_mark_node)); ;
     break;}
 case 209:
-#line 1044 "parse.y"
+#line 1043 "parse.y"
 { chainon (yyval.ttype, build_expr_list (NULL_TREE, yyvsp[0].ttype)); ;
     break;}
 case 210:
-#line 1046 "parse.y"
+#line 1045 "parse.y"
 { chainon (yyval.ttype, build_expr_list (NULL_TREE, error_mark_node)); ;
     break;}
 case 211:
-#line 1051 "parse.y"
+#line 1050 "parse.y"
 { yyval.ttype = build_expr_list (NULL_TREE, yyval.ttype); ;
     break;}
 case 213:
-#line 1057 "parse.y"
+#line 1056 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 214:
-#line 1060 "parse.y"
+#line 1059 "parse.y"
 { yyval.ttype = yyvsp[0].ttype;
                  pedantic = yyvsp[-1].itype; ;
     break;}
 case 215:
-#line 1063 "parse.y"
+#line 1062 "parse.y"
 { yyval.ttype = build_x_indirect_ref (yyvsp[0].ttype, "unary *"); ;
     break;}
 case 216:
-#line 1065 "parse.y"
+#line 1064 "parse.y"
 { yyval.ttype = build_x_unary_op (ADDR_EXPR, yyvsp[0].ttype); ;
     break;}
 case 217:
-#line 1067 "parse.y"
+#line 1066 "parse.y"
 { yyval.ttype = build_x_unary_op (BIT_NOT_EXPR, yyvsp[0].ttype); ;
     break;}
 case 218:
-#line 1069 "parse.y"
+#line 1068 "parse.y"
 { yyval.ttype = finish_unary_op_expr (yyvsp[-1].code, yyvsp[0].ttype); ;
     break;}
 case 219:
-#line 1072 "parse.y"
+#line 1071 "parse.y"
 { if (pedantic)
-                   cp_pedwarn (ec_forbids);
+                   pedwarn ("ANSI C++ forbids `&&'");
                  yyval.ttype = finish_label_address_expr (yyvsp[0].ttype); ;
     break;}
 case 220:
-#line 1076 "parse.y"
+#line 1075 "parse.y"
 { yyval.ttype = expr_sizeof (yyvsp[0].ttype); ;
     break;}
 case 221:
-#line 1078 "parse.y"
+#line 1077 "parse.y"
 { yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ftype.t)); ;
     break;}
 case 222:
-#line 1080 "parse.y"
+#line 1079 "parse.y"
 { yyval.ttype = grok_alignof (yyvsp[0].ttype); ;
     break;}
 case 223:
-#line 1082 "parse.y"
+#line 1081 "parse.y"
 { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ftype.t)); 
                  check_for_new_type ("alignof", yyvsp[-1].ftype); ;
     break;}
 case 224:
-#line 1088 "parse.y"
+#line 1087 "parse.y"
 { yyval.ttype = build_new (NULL_TREE, yyvsp[0].ftype.t, NULL_TREE, yyvsp[-1].itype); 
                  check_for_new_type ("new", yyvsp[0].ftype); ;
     break;}
 case 225:
-#line 1091 "parse.y"
+#line 1090 "parse.y"
 { yyval.ttype = build_new (NULL_TREE, yyvsp[-1].ftype.t, yyvsp[0].ttype, yyvsp[-2].itype); 
                  check_for_new_type ("new", yyvsp[-1].ftype); ;
     break;}
 case 226:
-#line 1094 "parse.y"
+#line 1093 "parse.y"
 { yyval.ttype = build_new (yyvsp[-1].ttype, yyvsp[0].ftype.t, NULL_TREE, yyvsp[-2].itype); 
                  check_for_new_type ("new", yyvsp[0].ftype); ;
     break;}
 case 227:
-#line 1097 "parse.y"
+#line 1096 "parse.y"
 { yyval.ttype = build_new (yyvsp[-2].ttype, yyvsp[-1].ftype.t, yyvsp[0].ttype, yyvsp[-3].itype); 
                  check_for_new_type ("new", yyvsp[-1].ftype); ;
     break;}
 case 228:
-#line 1110 "parse.y"
+#line 1109 "parse.y"
 { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-1].ftype.t),
                                  NULL_TREE, yyvsp[-4].itype); 
                  check_for_new_type ("new", yyvsp[-1].ftype); ;
     break;}
 case 229:
-#line 1115 "parse.y"
+#line 1114 "parse.y"
 { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-2].ftype.t), yyvsp[0].ttype, yyvsp[-5].itype); 
                  check_for_new_type ("new", yyvsp[-2].ftype); ;
     break;}
 case 230:
-#line 1119 "parse.y"
+#line 1118 "parse.y"
 { yyval.ttype = build_new (yyvsp[-4].ttype, groktypename(yyvsp[-1].ftype.t), NULL_TREE, yyvsp[-5].itype); 
                  check_for_new_type ("new", yyvsp[-1].ftype); ;
     break;}
 case 231:
-#line 1123 "parse.y"
+#line 1122 "parse.y"
 { yyval.ttype = build_new (yyvsp[-5].ttype, groktypename(yyvsp[-2].ftype.t), yyvsp[0].ttype, yyvsp[-6].itype); 
                  check_for_new_type ("new", yyvsp[-2].ftype); ;
     break;}
 case 232:
-#line 1127 "parse.y"
+#line 1126 "parse.y"
 { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 0, yyvsp[-1].itype); ;
     break;}
 case 233:
-#line 1129 "parse.y"
+#line 1128 "parse.y"
 { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 1, yyvsp[-3].itype);
                  if (yychar == YYEMPTY)
                    yychar = YYLEX; ;
     break;}
 case 234:
-#line 1133 "parse.y"
+#line 1132 "parse.y"
 { yyval.ttype = delete_sanity (yyvsp[0].ttype, yyvsp[-2].ttype, 2, yyvsp[-4].itype);
                  if (yychar == YYEMPTY)
                    yychar = YYLEX; ;
     break;}
 case 235:
-#line 1137 "parse.y"
+#line 1136 "parse.y"
 { yyval.ttype = build_x_unary_op (REALPART_EXPR, yyvsp[0].ttype); ;
     break;}
 case 236:
-#line 1139 "parse.y"
+#line 1138 "parse.y"
 { yyval.ttype = build_x_unary_op (IMAGPART_EXPR, yyvsp[0].ttype); ;
     break;}
 case 237:
-#line 1149 "parse.y"
+#line 1148 "parse.y"
 { finish_new_placement (NULL_TREE, yyvsp[-2].itype); ;
     break;}
 case 238:
-#line 1152 "parse.y"
+#line 1151 "parse.y"
 { yyval.itype = begin_new_placement (); ;
     break;}
 case 239:
-#line 1156 "parse.y"
+#line 1155 "parse.y"
 { yyval.ttype = finish_new_placement (yyvsp[-1].ttype, yyvsp[-2].itype); ;
     break;}
 case 240:
-#line 1158 "parse.y"
-{ cp_pedwarn (ec_old_style_placement_syntax_use_instead);
+#line 1157 "parse.y"
+{ cp_pedwarn ("old style placement syntax, use () instead");
                  yyval.ttype = finish_new_placement (yyvsp[-1].ttype, yyvsp[-2].itype); ;
     break;}
 case 241:
-#line 1164 "parse.y"
+#line 1163 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 242:
-#line 1166 "parse.y"
+#line 1165 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 243:
-#line 1168 "parse.y"
+#line 1167 "parse.y"
 {
-                 cp_error (ec_is_not_a_valid_expression, yyvsp[-1].ftype.t);
+                 cp_error ("`%T' is not a valid expression", yyvsp[-1].ftype.t);
                  yyval.ttype = error_mark_node;
                ;
     break;}
 case 244:
-#line 1176 "parse.y"
+#line 1175 "parse.y"
 {
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_initialization_of_new_expression_with);
+                   pedwarn ("ANSI C++ forbids initialization of new expression with `='");
                  if (TREE_CODE (yyvsp[0].ttype) != TREE_LIST
                      && TREE_CODE (yyvsp[0].ttype) != CONSTRUCTOR)
                    yyval.ttype = build_expr_list (NULL_TREE, yyvsp[0].ttype);
@@ -5035,28 +5034,28 @@ case 244:
                ;
     break;}
 case 245:
-#line 1190 "parse.y"
+#line 1189 "parse.y"
 { yyvsp[-1].ftype.t = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[-1].ftype.t), 0);
                  yyval.ttype = make_call_declarator (NULL_TREE, yyvsp[-1].ftype.t, NULL_TREE, NULL_TREE);
                  check_for_new_type ("cast", yyvsp[-1].ftype); ;
     break;}
 case 246:
-#line 1194 "parse.y"
+#line 1193 "parse.y"
 { yyvsp[-1].ftype.t = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[-1].ftype.t), 0); 
                  yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-1].ftype.t, NULL_TREE, NULL_TREE);
                  check_for_new_type ("cast", yyvsp[-1].ftype); ;
     break;}
 case 248:
-#line 1202 "parse.y"
+#line 1201 "parse.y"
 { yyval.ttype = reparse_absdcl_as_casts (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 249:
-#line 1204 "parse.y"
+#line 1203 "parse.y"
 { 
                  tree init = build_nt (CONSTRUCTOR, NULL_TREE,
                                        nreverse (yyvsp[-2].ttype)); 
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_constructorexpressions);
+                   pedwarn ("ANSI C++ forbids constructor-expressions");
                  /* Indicate that this was a GNU C constructor expression.  */
                  TREE_HAS_CONSTRUCTOR (init) = 1;
 
@@ -5064,161 +5063,161 @@ case 249:
                ;
     break;}
 case 251:
-#line 1220 "parse.y"
+#line 1219 "parse.y"
 { yyval.ttype = build_x_binary_op (MEMBER_REF, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 252:
-#line 1222 "parse.y"
+#line 1221 "parse.y"
 { yyval.ttype = build_m_component_ref (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 253:
-#line 1224 "parse.y"
+#line 1223 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 254:
-#line 1226 "parse.y"
+#line 1225 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 255:
-#line 1228 "parse.y"
+#line 1227 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 256:
-#line 1230 "parse.y"
+#line 1229 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 257:
-#line 1232 "parse.y"
+#line 1231 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 258:
-#line 1234 "parse.y"
+#line 1233 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 259:
-#line 1236 "parse.y"
+#line 1235 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 260:
-#line 1238 "parse.y"
+#line 1237 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 261:
-#line 1240 "parse.y"
+#line 1239 "parse.y"
 { yyval.ttype = build_x_binary_op (LT_EXPR, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 262:
-#line 1242 "parse.y"
+#line 1241 "parse.y"
 { yyval.ttype = build_x_binary_op (GT_EXPR, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 263:
-#line 1244 "parse.y"
+#line 1243 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 264:
-#line 1246 "parse.y"
+#line 1245 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 265:
-#line 1248 "parse.y"
+#line 1247 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 266:
-#line 1250 "parse.y"
+#line 1249 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 267:
-#line 1252 "parse.y"
+#line 1251 "parse.y"
 { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 268:
-#line 1254 "parse.y"
+#line 1253 "parse.y"
 { yyval.ttype = build_x_binary_op (TRUTH_ANDIF_EXPR, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 269:
-#line 1256 "parse.y"
+#line 1255 "parse.y"
 { yyval.ttype = build_x_binary_op (TRUTH_ORIF_EXPR, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 270:
-#line 1258 "parse.y"
+#line 1257 "parse.y"
 { yyval.ttype = build_x_conditional_expr (yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ;
     break;}
 case 271:
-#line 1260 "parse.y"
+#line 1259 "parse.y"
 { yyval.ttype = build_x_modify_expr (yyval.ttype, NOP_EXPR, yyvsp[0].ttype);
                  if (yyval.ttype != error_mark_node)
                     C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ;
     break;}
 case 272:
-#line 1264 "parse.y"
+#line 1263 "parse.y"
 { yyval.ttype = build_x_modify_expr (yyval.ttype, yyvsp[-1].code, yyvsp[0].ttype); ;
     break;}
 case 273:
-#line 1266 "parse.y"
+#line 1265 "parse.y"
 { yyval.ttype = build_throw (NULL_TREE); ;
     break;}
 case 274:
-#line 1268 "parse.y"
+#line 1267 "parse.y"
 { yyval.ttype = build_throw (yyvsp[0].ttype); ;
     break;}
 case 275:
-#line 1286 "parse.y"
+#line 1285 "parse.y"
 { yyval.ttype = build_parse_node (BIT_NOT_EXPR, yyvsp[0].ttype); ;
     break;}
 case 276:
-#line 1288 "parse.y"
+#line 1287 "parse.y"
 { yyval.ttype = build_parse_node (BIT_NOT_EXPR, yyvsp[0].ttype); ;
     break;}
 case 282:
-#line 1297 "parse.y"
+#line 1296 "parse.y"
 { yyval.ttype = do_identifier (yyvsp[-1].ttype, 1, NULL_TREE); ;
     break;}
 case 283:
-#line 1301 "parse.y"
+#line 1300 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 284:
-#line 1303 "parse.y"
+#line 1302 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 285:
-#line 1308 "parse.y"
+#line 1307 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 286:
-#line 1310 "parse.y"
+#line 1309 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 287:
-#line 1313 "parse.y"
+#line 1312 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 292:
-#line 1325 "parse.y"
+#line 1324 "parse.y"
 { yyval.ttype = build_parse_node (INDIRECT_REF, yyvsp[0].ttype); ;
     break;}
 case 293:
-#line 1327 "parse.y"
+#line 1326 "parse.y"
 { yyval.ttype = build_parse_node (ADDR_EXPR, yyvsp[0].ttype); ;
     break;}
 case 294:
-#line 1329 "parse.y"
+#line 1328 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 295:
-#line 1334 "parse.y"
+#line 1333 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 296:
-#line 1336 "parse.y"
+#line 1335 "parse.y"
 { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 300:
-#line 1346 "parse.y"
+#line 1345 "parse.y"
 { yyval.ttype = finish_decl_parsing (yyvsp[-1].ttype); ;
     break;}
 case 301:
-#line 1351 "parse.y"
+#line 1350 "parse.y"
 {
                  if (TREE_CODE (yyvsp[0].ttype) == BIT_NOT_EXPR)
                    yyval.ttype = build_x_unary_op (BIT_NOT_EXPR, TREE_OPERAND (yyvsp[0].ttype, 0));
@@ -5227,7 +5226,7 @@ case 301:
                ;
     break;}
 case 304:
-#line 1360 "parse.y"
+#line 1359 "parse.y"
 {
                  if (processing_template_decl)
                    push_obstacks (&permanent_obstack, &permanent_obstack);
@@ -5243,69 +5242,69 @@ case 304:
                ;
     break;}
 case 305:
-#line 1374 "parse.y"
+#line 1373 "parse.y"
 { yyval.ttype = finish_parenthesized_expr (yyvsp[-1].ttype); ;
     break;}
 case 306:
-#line 1376 "parse.y"
+#line 1375 "parse.y"
 { yyvsp[-1].ttype = reparse_decl_as_expr (NULL_TREE, yyvsp[-1].ttype);
                  yyval.ttype = finish_parenthesized_expr (yyvsp[-1].ttype); ;
     break;}
 case 307:
-#line 1379 "parse.y"
+#line 1378 "parse.y"
 { yyval.ttype = error_mark_node; ;
     break;}
 case 308:
-#line 1381 "parse.y"
+#line 1380 "parse.y"
 { tree scope = current_scope ();
                  if (!scope || TREE_CODE (scope) != FUNCTION_DECL)
                    {
-                     cp_error (ec_bracedgroup_within_expression_allowed_only_inside_a_function);
+                     error ("braced-group within expression allowed only inside a function");
                      YYERROR;
                    }
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_bracedgroups_within_expressions);  
+                   pedwarn ("ANSI C++ forbids braced-groups within expressions");  
                  yyval.ttype = begin_stmt_expr (); 
                ;
     break;}
 case 309:
-#line 1392 "parse.y"
+#line 1391 "parse.y"
 { yyval.ttype = finish_stmt_expr (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 310:
-#line 1397 "parse.y"
+#line 1396 "parse.y"
 { yyval.ttype = finish_call_expr (yyvsp[-3].ttype, yyvsp[-1].ttype, 1); ;
     break;}
 case 311:
-#line 1399 "parse.y"
+#line 1398 "parse.y"
 { yyval.ttype = finish_call_expr (yyvsp[-1].ttype, NULL_TREE, 1); ;
     break;}
 case 312:
-#line 1401 "parse.y"
+#line 1400 "parse.y"
 { yyval.ttype = finish_call_expr (yyvsp[-3].ttype, yyvsp[-1].ttype, 0); ;
     break;}
 case 313:
-#line 1403 "parse.y"
+#line 1402 "parse.y"
 { yyval.ttype = finish_call_expr (yyvsp[-1].ttype, NULL_TREE, 0); ;
     break;}
 case 314:
-#line 1405 "parse.y"
+#line 1404 "parse.y"
 { yyval.ttype = grok_array_decl (yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 315:
-#line 1407 "parse.y"
+#line 1406 "parse.y"
 { yyval.ttype = finish_increment_expr (yyvsp[-1].ttype, POSTINCREMENT_EXPR); ;
     break;}
 case 316:
-#line 1409 "parse.y"
+#line 1408 "parse.y"
 { yyval.ttype = finish_increment_expr (yyvsp[-1].ttype, POSTDECREMENT_EXPR); ;
     break;}
 case 317:
-#line 1412 "parse.y"
+#line 1411 "parse.y"
 { yyval.ttype = finish_this_expr (); ;
     break;}
 case 318:
-#line 1414 "parse.y"
+#line 1413 "parse.y"
 {
                  tree type = NULL_TREE;
                  tree id = yyval.ttype;
@@ -5319,7 +5318,7 @@ case 318:
 #if 0
                  if (yyvsp[-1].ttype == NULL_TREE)
                    {
-                     cp_error (ec_cannot_cast_null_list_to_type_s,
+                     error ("cannot cast null list to type `%s'",
                             IDENTIFIER_POINTER (TYPE_NAME (id)));
                      yyval.ttype = error_mark_node;
                      break;
@@ -5340,7 +5339,7 @@ case 318:
                      /* should not be able to get here (mrs) */
                      else if (id == ridpointers[(int) RID_FRIEND])
                        {
-                         cp_error (ec_cannot_cast_expression_to_friend_type);
+                         error ("cannot cast expression to `friend' type");
                          yyval.ttype = error_mark_node;
                          break;
                        }
@@ -5351,49 +5350,49 @@ case 318:
                ;
     break;}
 case 320:
-#line 1459 "parse.y"
+#line 1458 "parse.y"
 { tree type = groktypename (yyvsp[-4].ftype.t);
                  check_for_new_type ("dynamic_cast", yyvsp[-4].ftype);
                  yyval.ttype = build_dynamic_cast (type, yyvsp[-1].ttype); ;
     break;}
 case 321:
-#line 1463 "parse.y"
+#line 1462 "parse.y"
 { tree type = groktypename (yyvsp[-4].ftype.t);
                  check_for_new_type ("static_cast", yyvsp[-4].ftype);
                  yyval.ttype = build_static_cast (type, yyvsp[-1].ttype); ;
     break;}
 case 322:
-#line 1467 "parse.y"
+#line 1466 "parse.y"
 { tree type = groktypename (yyvsp[-4].ftype.t);
                  check_for_new_type ("reinterpret_cast", yyvsp[-4].ftype);
                  yyval.ttype = build_reinterpret_cast (type, yyvsp[-1].ttype); ;
     break;}
 case 323:
-#line 1471 "parse.y"
+#line 1470 "parse.y"
 { tree type = groktypename (yyvsp[-4].ftype.t);
                  check_for_new_type ("const_cast", yyvsp[-4].ftype);
                  yyval.ttype = build_const_cast (type, yyvsp[-1].ttype); ;
     break;}
 case 324:
-#line 1475 "parse.y"
+#line 1474 "parse.y"
 { yyval.ttype = build_x_typeid (yyvsp[-1].ttype); ;
     break;}
 case 325:
-#line 1477 "parse.y"
+#line 1476 "parse.y"
 { tree type = groktypename (yyvsp[-1].ftype.t);
                  check_for_new_type ("typeid", yyvsp[-1].ftype);
                  yyval.ttype = get_typeid (TYPE_MAIN_VARIANT (type)); ;
     break;}
 case 326:
-#line 1481 "parse.y"
+#line 1480 "parse.y"
 { yyval.ttype = do_scoped_id (yyvsp[0].ttype, 1); ;
     break;}
 case 327:
-#line 1483 "parse.y"
+#line 1482 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 328:
-#line 1485 "parse.y"
+#line 1484 "parse.y"
 {
                  got_scope = NULL_TREE;
                  if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
@@ -5403,102 +5402,102 @@ case 328:
                ;
     break;}
 case 329:
-#line 1493 "parse.y"
+#line 1492 "parse.y"
 { yyval.ttype = build_offset_ref (OP0 (yyval.ttype), OP1 (yyval.ttype)); ;
     break;}
 case 330:
-#line 1495 "parse.y"
+#line 1494 "parse.y"
 { yyval.ttype = finish_qualified_call_expr (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 331:
-#line 1497 "parse.y"
+#line 1496 "parse.y"
 { yyval.ttype = finish_qualified_call_expr (yyvsp[-1].ttype, NULL_TREE); ;
     break;}
 case 332:
-#line 1499 "parse.y"
+#line 1498 "parse.y"
 { 
                  yyval.ttype = build_x_component_ref (yyval.ttype, yyvsp[0].ttype, NULL_TREE, 1); 
                ;
     break;}
 case 333:
-#line 1503 "parse.y"
+#line 1502 "parse.y"
 { yyval.ttype = finish_object_call_expr (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ;
     break;}
 case 334:
-#line 1505 "parse.y"
+#line 1504 "parse.y"
 { yyval.ttype = finish_object_call_expr (yyvsp[-1].ttype, yyvsp[-2].ttype, NULL_TREE); ;
     break;}
 case 335:
-#line 1507 "parse.y"
+#line 1506 "parse.y"
 { yyval.ttype = build_x_component_ref (yyval.ttype, yyvsp[0].ttype, NULL_TREE, 1); ;
     break;}
 case 336:
-#line 1509 "parse.y"
+#line 1508 "parse.y"
 { if (processing_template_decl)
                    yyval.ttype = build_min_nt (COMPONENT_REF, yyvsp[-1].ttype, copy_to_permanent (yyvsp[0].ttype));
                  else
                    yyval.ttype = build_object_ref (yyval.ttype, OP0 (yyvsp[0].ttype), OP1 (yyvsp[0].ttype)); ;
     break;}
 case 337:
-#line 1514 "parse.y"
+#line 1513 "parse.y"
 { yyval.ttype = finish_object_call_expr (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ;
     break;}
 case 338:
-#line 1516 "parse.y"
+#line 1515 "parse.y"
 { yyval.ttype = finish_object_call_expr (yyvsp[-1].ttype, yyvsp[-2].ttype, NULL_TREE); ;
     break;}
 case 339:
-#line 1518 "parse.y"
+#line 1517 "parse.y"
 { yyval.ttype = finish_qualified_object_call_expr (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ;
     break;}
 case 340:
-#line 1520 "parse.y"
+#line 1519 "parse.y"
 { yyval.ttype = finish_qualified_object_call_expr (yyvsp[-1].ttype, yyvsp[-2].ttype, NULL_TREE); ;
     break;}
 case 341:
-#line 1523 "parse.y"
+#line 1522 "parse.y"
 { yyval.ttype = finish_pseudo_destructor_call_expr (yyvsp[-3].ttype, NULL_TREE, yyvsp[-1].ttype); ;
     break;}
 case 342:
-#line 1525 "parse.y"
+#line 1524 "parse.y"
 { yyval.ttype = finish_pseudo_destructor_call_expr (yyvsp[-5].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ;
     break;}
 case 343:
-#line 1527 "parse.y"
+#line 1526 "parse.y"
 {
                  yyval.ttype = error_mark_node;
                ;
     break;}
 case 344:
-#line 1572 "parse.y"
+#line 1571 "parse.y"
 { yyval.itype = 0; ;
     break;}
 case 345:
-#line 1574 "parse.y"
+#line 1573 "parse.y"
 { got_scope = NULL_TREE; yyval.itype = 1; ;
     break;}
 case 346:
-#line 1579 "parse.y"
+#line 1578 "parse.y"
 { yyval.itype = 0; ;
     break;}
 case 347:
-#line 1581 "parse.y"
+#line 1580 "parse.y"
 { got_scope = NULL_TREE; yyval.itype = 1; ;
     break;}
 case 348:
-#line 1586 "parse.y"
+#line 1585 "parse.y"
 { yyval.ttype = boolean_true_node; ;
     break;}
 case 349:
-#line 1588 "parse.y"
+#line 1587 "parse.y"
 { yyval.ttype = boolean_false_node; ;
     break;}
 case 351:
-#line 1595 "parse.y"
+#line 1594 "parse.y"
 { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 352:
-#line 1600 "parse.y"
+#line 1599 "parse.y"
 {
                  if (! current_function_parms_stored)
                    store_parm_decls ();
@@ -5510,18 +5509,18 @@ case 352:
                ;
     break;}
 case 353:
-#line 1613 "parse.y"
+#line 1612 "parse.y"
 { got_object = TREE_TYPE (yyval.ttype); ;
     break;}
 case 354:
-#line 1615 "parse.y"
+#line 1614 "parse.y"
 {
                  yyval.ttype = build_x_arrow (yyval.ttype); 
                  got_object = TREE_TYPE (yyval.ttype);
                ;
     break;}
 case 355:
-#line 1623 "parse.y"
+#line 1622 "parse.y"
 {
                  resume_momentary (yyvsp[-1].itype);
                  if (yyvsp[-2].ftype.t && IS_AGGR_TYPE_CODE (TREE_CODE (yyvsp[-2].ftype.t)))
@@ -5529,200 +5528,200 @@ case 355:
                ;
     break;}
 case 356:
-#line 1629 "parse.y"
+#line 1628 "parse.y"
 {
                  resume_momentary (yyvsp[-1].itype);
                  note_list_got_semicolon (yyvsp[-2].ftype.t);
                ;
     break;}
 case 357:
-#line 1634 "parse.y"
+#line 1633 "parse.y"
 { resume_momentary (yyvsp[-1].itype); ;
     break;}
 case 358:
-#line 1636 "parse.y"
+#line 1635 "parse.y"
 {
                  shadow_tag (yyvsp[-1].ftype.t);
                  note_list_got_semicolon (yyvsp[-1].ftype.t);
                ;
     break;}
 case 359:
-#line 1641 "parse.y"
-{ cp_warning (ec_empty_declaration); ;
+#line 1640 "parse.y"
+{ warning ("empty declaration"); ;
     break;}
 case 360:
-#line 1643 "parse.y"
+#line 1642 "parse.y"
 { pedantic = yyvsp[-1].itype; ;
     break;}
 case 363:
-#line 1657 "parse.y"
+#line 1656 "parse.y"
 { yyval.ttype = make_call_declarator (NULL_TREE, empty_parms (),
                                             NULL_TREE, NULL_TREE); ;
     break;}
 case 364:
-#line 1660 "parse.y"
+#line 1659 "parse.y"
 { yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), NULL_TREE,
                                             NULL_TREE); ;
     break;}
 case 365:
-#line 1667 "parse.y"
+#line 1666 "parse.y"
 { yyval.ftype.t = build_decl_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 366:
-#line 1670 "parse.y"
+#line 1669 "parse.y"
 { yyval.ftype.t = build_decl_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 367:
-#line 1673 "parse.y"
+#line 1672 "parse.y"
 { yyval.ftype.t = build_decl_list (get_decl_list (yyvsp[-1].ftype.t), yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 368:
-#line 1676 "parse.y"
+#line 1675 "parse.y"
 { yyval.ftype.t = build_decl_list (yyvsp[0].ftype.t, NULL_TREE);
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag;  ;
     break;}
 case 369:
-#line 1679 "parse.y"
+#line 1678 "parse.y"
 { yyval.ftype.t = build_decl_list (yyvsp[0].ftype.t, NULL_TREE); 
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
     break;}
 case 372:
-#line 1695 "parse.y"
+#line 1694 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyvsp[-1].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
     break;}
 case 373:
-#line 1698 "parse.y"
+#line 1697 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 374:
-#line 1701 "parse.y"
+#line 1700 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-2].ftype.t, chainon (yyvsp[-1].ttype, yyvsp[0].ttype)); 
                  yyval.ftype.new_type_flag = yyvsp[-2].ftype.new_type_flag; ;
     break;}
 case 375:
-#line 1704 "parse.y"
+#line 1703 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, chainon (yyvsp[0].ttype, yyvsp[-2].ttype)); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 376:
-#line 1707 "parse.y"
+#line 1706 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, chainon (yyvsp[0].ttype, yyvsp[-2].ttype)); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 377:
-#line 1710 "parse.y"
+#line 1709 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-2].ftype.t,
                                         chainon (yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyvsp[-3].ttype))); 
                  yyval.ftype.new_type_flag = yyvsp[-2].ftype.new_type_flag; ;
     break;}
 case 378:
-#line 1717 "parse.y"
+#line 1716 "parse.y"
 { if (extra_warnings)
-                   cp_warning (ec_s_is_not_at_beginning_of_declaration,
+                   warning ("`%s' is not at beginning of declaration",
                             IDENTIFIER_POINTER (yyval.ttype));
                  yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ;
     break;}
 case 379:
-#line 1722 "parse.y"
+#line 1721 "parse.y"
 { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyval.ttype); ;
     break;}
 case 380:
-#line 1724 "parse.y"
+#line 1723 "parse.y"
 { if (extra_warnings)
-                   cp_warning (ec_s_is_not_at_beginning_of_declaration,
+                   warning ("`%s' is not at beginning of declaration",
                             IDENTIFIER_POINTER (yyvsp[0].ttype));
                  yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
     break;}
 case 381:
-#line 1729 "parse.y"
+#line 1728 "parse.y"
 { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ;
     break;}
 case 382:
-#line 1731 "parse.y"
+#line 1730 "parse.y"
 { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ;
     break;}
 case 383:
-#line 1741 "parse.y"
+#line 1740 "parse.y"
 { yyval.ttype = yyvsp[0].ftype.t; TREE_STATIC (yyval.ttype) = 1; ;
     break;}
 case 384:
-#line 1743 "parse.y"
+#line 1742 "parse.y"
 { yyval.ttype = IDENTIFIER_AS_LIST (yyval.ttype); ;
     break;}
 case 385:
-#line 1745 "parse.y"
+#line 1744 "parse.y"
 { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype);
                  TREE_STATIC (yyval.ttype) = 1; ;
     break;}
 case 386:
-#line 1748 "parse.y"
+#line 1747 "parse.y"
 { if (extra_warnings && TREE_STATIC (yyval.ttype))
-                   cp_warning (ec_s_is_not_at_beginning_of_declaration,
+                   warning ("`%s' is not at beginning of declaration",
                             IDENTIFIER_POINTER (yyvsp[0].ttype));
                  yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype);
                  TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ;
     break;}
 case 387:
-#line 1754 "parse.y"
+#line 1753 "parse.y"
 { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ;
     break;}
 case 388:
-#line 1756 "parse.y"
+#line 1755 "parse.y"
 { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ;
     break;}
 case 389:
-#line 1767 "parse.y"
+#line 1766 "parse.y"
 { yyval.ftype.t = get_decl_list (yyvsp[0].ftype.t); 
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
     break;}
 case 390:
-#line 1770 "parse.y"
+#line 1769 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyvsp[-1].ftype.t); 
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
     break;}
 case 391:
-#line 1773 "parse.y"
+#line 1772 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 392:
-#line 1776 "parse.y"
+#line 1775 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, chainon (yyvsp[0].ttype, yyvsp[-2].ftype.t)); 
                  yyval.ftype.new_type_flag = yyvsp[-2].ftype.new_type_flag; ;
     break;}
 case 393:
-#line 1782 "parse.y"
+#line 1781 "parse.y"
 { yyval.ttype = build_decl_list (NULL_TREE, yyvsp[0].ftype.t); ;
     break;}
 case 394:
-#line 1784 "parse.y"
+#line 1783 "parse.y"
 { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyvsp[-1].ttype); ;
     break;}
 case 396:
-#line 1794 "parse.y"
+#line 1793 "parse.y"
 { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ;
     break;}
 case 397:
-#line 1796 "parse.y"
+#line 1795 "parse.y"
 { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ;
     break;}
 case 398:
-#line 1798 "parse.y"
+#line 1797 "parse.y"
 { yyval.ftype.t = TREE_TYPE (yyvsp[-1].ttype);
                  yyval.ftype.new_type_flag = 0; ;
     break;}
 case 399:
-#line 1801 "parse.y"
+#line 1800 "parse.y"
 { yyval.ftype.t = groktypename (yyvsp[-1].ftype.t);
                  yyval.ftype.new_type_flag = 0; ;
     break;}
 case 400:
-#line 1804 "parse.y"
+#line 1803 "parse.y"
 { tree type = TREE_TYPE (yyvsp[-1].ttype);
 
                   yyval.ftype.new_type_flag = 0;
@@ -5733,13 +5732,13 @@ case 400:
                    }
                  else
                    {
-                     cp_error (ec_sigof_applied_to_nonaggregate_expression);
+                     error ("`sigof' applied to non-aggregate expression");
                      yyval.ftype.t = error_mark_node;
                    }
                ;
     break;}
 case 401:
-#line 1819 "parse.y"
+#line 1818 "parse.y"
 { tree type = groktypename (yyvsp[-1].ftype.t);
 
                   yyval.ftype.new_type_flag = 0;
@@ -5750,194 +5749,194 @@ case 401:
                    }
                  else
                    {
-                     cp_error (ec_sigof_applied_to_nonaggregate_type);
+                     error("`sigof' applied to non-aggregate type");
                      yyval.ftype.t = error_mark_node;
                    }
                ;
     break;}
 case 402:
-#line 1839 "parse.y"
+#line 1838 "parse.y"
 { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ;
     break;}
 case 403:
-#line 1841 "parse.y"
+#line 1840 "parse.y"
 { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ;
     break;}
 case 411:
-#line 1862 "parse.y"
+#line 1861 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 412:
-#line 1864 "parse.y"
+#line 1863 "parse.y"
 { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 413:
-#line 1869 "parse.y"
+#line 1868 "parse.y"
 { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1,
                                          yyvsp[-1].ttype, prefix_attributes); ;
     break;}
 case 414:
-#line 1873 "parse.y"
+#line 1872 "parse.y"
 { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 1, LOOKUP_ONLYCONVERTING); ;
     break;}
 case 415:
-#line 1875 "parse.y"
+#line 1874 "parse.y"
 { yyval.ttype = start_decl (yyvsp[-2].ttype, current_declspecs, 0,
                                          yyvsp[0].ttype, prefix_attributes);
                  cp_finish_decl (yyval.ttype, NULL_TREE, yyvsp[-1].ttype, 1, 0); ;
     break;}
 case 416:
-#line 1888 "parse.y"
+#line 1887 "parse.y"
 { yyvsp[0].itype = parse_decl (yyvsp[-3].ttype, yyvsp[-4].ttype, 
                                           yyvsp[-1].ttype, 1, &yyval.ttype); ;
     break;}
 case 417:
-#line 1893 "parse.y"
+#line 1892 "parse.y"
 { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 1,
                                  LOOKUP_ONLYCONVERTING);
                  yyval.itype = yyvsp[-2].itype; ;
     break;}
 case 418:
-#line 1897 "parse.y"
+#line 1896 "parse.y"
 { tree d;
                  yyval.itype = parse_decl (yyvsp[-2].ttype, yyvsp[-3].ttype, yyvsp[0].ttype, 0, &d);
                  cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 1, 0); ;
     break;}
 case 419:
-#line 1904 "parse.y"
+#line 1903 "parse.y"
 { yyval.itype = yyvsp[0].itype; ;
     break;}
 case 420:
-#line 1908 "parse.y"
+#line 1907 "parse.y"
 { yyval.itype = yyvsp[0].itype; ;
     break;}
 case 421:
-#line 1913 "parse.y"
+#line 1912 "parse.y"
 { /* Set things up as initdcl0_innards expects.  */
              yyval.ttype = yyvsp[-1].ttype; 
               yyvsp[-1].ttype = NULL_TREE; ;
     break;}
 case 422:
-#line 1917 "parse.y"
+#line 1916 "parse.y"
 {;
     break;}
 case 423:
-#line 1919 "parse.y"
+#line 1918 "parse.y"
 { tree d;
                  parse_decl(yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype, 0, &d);
                  cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 1, 0); ;
     break;}
 case 424:
-#line 1928 "parse.y"
+#line 1927 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 425:
-#line 1930 "parse.y"
+#line 1929 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 426:
-#line 1935 "parse.y"
+#line 1934 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 427:
-#line 1937 "parse.y"
+#line 1936 "parse.y"
 { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 428:
-#line 1942 "parse.y"
+#line 1941 "parse.y"
 { yyval.ttype = yyvsp[-2].ttype; ;
     break;}
 case 429:
-#line 1947 "parse.y"
+#line 1946 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 430:
-#line 1949 "parse.y"
+#line 1948 "parse.y"
 { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
     break;}
 case 431:
-#line 1954 "parse.y"
+#line 1953 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 432:
-#line 1956 "parse.y"
+#line 1955 "parse.y"
 { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ;
     break;}
 case 433:
-#line 1958 "parse.y"
+#line 1957 "parse.y"
 { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ;
     break;}
 case 434:
-#line 1960 "parse.y"
+#line 1959 "parse.y"
 { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ;
     break;}
 case 435:
-#line 1962 "parse.y"
+#line 1961 "parse.y"
 { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 440:
-#line 1978 "parse.y"
+#line 1977 "parse.y"
 { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 441:
-#line 1980 "parse.y"
+#line 1979 "parse.y"
 { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
     break;}
 case 442:
-#line 1985 "parse.y"
+#line 1984 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 443:
-#line 1987 "parse.y"
+#line 1986 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 445:
-#line 1995 "parse.y"
+#line 1994 "parse.y"
 { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, NULL_TREE);
                  TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ;
     break;}
 case 446:
-#line 1998 "parse.y"
+#line 1997 "parse.y"
 { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype));
                  TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ;
     break;}
 case 447:
-#line 2001 "parse.y"
+#line 2000 "parse.y"
 { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype));
                  TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ;
     break;}
 case 448:
-#line 2004 "parse.y"
+#line 2003 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 449:
-#line 2011 "parse.y"
+#line 2010 "parse.y"
 { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ;
     break;}
 case 450:
-#line 2013 "parse.y"
+#line 2012 "parse.y"
 { yyval.ttype = expr_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
     break;}
 case 451:
-#line 2016 "parse.y"
+#line 2015 "parse.y"
 { yyval.ttype = build_expr_list (yyvsp[-2].ttype, yyvsp[0].ttype); ;
     break;}
 case 452:
-#line 2018 "parse.y"
+#line 2017 "parse.y"
 { yyval.ttype = build_expr_list (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 453:
-#line 2020 "parse.y"
+#line 2019 "parse.y"
 { yyval.ttype = expr_tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ;
     break;}
 case 454:
-#line 2025 "parse.y"
+#line 2024 "parse.y"
 { start_function (NULL_TREE, TREE_VALUE (yyvsp[0].ttype),
                                  NULL_TREE, 1);
                  reinit_parse_for_function (); ;
     break;}
 case 455:
-#line 2031 "parse.y"
+#line 2030 "parse.y"
 {
                  int nested = (hack_decl_function_context
                                (current_function_decl) != NULL_TREE);
@@ -5946,37 +5945,37 @@ case 455:
                ;
     break;}
 case 456:
-#line 2038 "parse.y"
+#line 2037 "parse.y"
 { process_next_inline (yyvsp[-2].ttype); ;
     break;}
 case 457:
-#line 2040 "parse.y"
+#line 2039 "parse.y"
 { process_next_inline (yyvsp[-2].ttype); ;
     break;}
 case 460:
-#line 2052 "parse.y"
+#line 2051 "parse.y"
 { replace_defarg (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 461:
-#line 2054 "parse.y"
+#line 2053 "parse.y"
 { replace_defarg (yyvsp[-2].ttype, error_mark_node); ;
     break;}
 case 463:
-#line 2059 "parse.y"
+#line 2058 "parse.y"
 { do_pending_defargs (); ;
     break;}
 case 464:
-#line 2061 "parse.y"
+#line 2060 "parse.y"
 { do_pending_defargs (); ;
     break;}
 case 465:
-#line 2066 "parse.y"
+#line 2065 "parse.y"
 { yyvsp[0].itype = suspend_momentary ();
                  yyval.ttype = current_enum_type;
                  current_enum_type = start_enum (yyvsp[-1].ttype); ;
     break;}
 case 466:
-#line 2070 "parse.y"
+#line 2069 "parse.y"
 { TYPE_VALUES (current_enum_type) = yyvsp[-2].ttype;
                  yyval.ftype.t = finish_enum (current_enum_type);
                  yyval.ftype.new_type_flag = 1;
@@ -5985,19 +5984,19 @@ case 466:
                  check_for_missing_semicolon (yyval.ftype.t); ;
     break;}
 case 467:
-#line 2077 "parse.y"
+#line 2076 "parse.y"
 { yyval.ftype.t = finish_enum (start_enum (yyvsp[-2].ttype));
                  yyval.ftype.new_type_flag = 1;
                  check_for_missing_semicolon (yyval.ftype.t); ;
     break;}
 case 468:
-#line 2081 "parse.y"
+#line 2080 "parse.y"
 { yyvsp[0].itype = suspend_momentary ();
                  yyval.ttype = current_enum_type;
                  current_enum_type = start_enum (make_anon_name ()); ;
     break;}
 case 469:
-#line 2085 "parse.y"
+#line 2084 "parse.y"
 { TYPE_VALUES (current_enum_type) = yyvsp[-2].ttype;
                  yyval.ftype.t = finish_enum (current_enum_type);
                  yyval.ftype.new_type_flag = 1;
@@ -6006,30 +6005,30 @@ case 469:
                  check_for_missing_semicolon (yyval.ftype.t); ;
     break;}
 case 470:
-#line 2092 "parse.y"
+#line 2091 "parse.y"
 { yyval.ftype.t = finish_enum (start_enum (make_anon_name()));
                  yyval.ftype.new_type_flag = 1;
                  check_for_missing_semicolon (yyval.ftype.t); ;
     break;}
 case 471:
-#line 2096 "parse.y"
+#line 2095 "parse.y"
 { yyval.ftype.t = xref_tag (enum_type_node, yyvsp[0].ttype, 1); 
                  yyval.ftype.new_type_flag = 0; ;
     break;}
 case 472:
-#line 2099 "parse.y"
+#line 2098 "parse.y"
 { yyval.ftype.t = xref_tag (enum_type_node, yyvsp[0].ttype, 1); 
                  yyval.ftype.new_type_flag = 0; ;
     break;}
 case 473:
-#line 2102 "parse.y"
+#line 2101 "parse.y"
 { yyval.ftype.t = yyvsp[0].ttype;
                  yyval.ftype.new_type_flag = 0; 
                  if (!processing_template_decl)
-                   cp_pedwarn (ec_using_typename_outside_of_template); ;
+                   cp_pedwarn ("using `typename' outside of template"); ;
     break;}
 case 474:
-#line 2109 "parse.y"
+#line 2108 "parse.y"
 { 
                  int semi;
 
@@ -6041,22 +6040,22 @@ case 474:
                ;
     break;}
 case 475:
-#line 2119 "parse.y"
+#line 2118 "parse.y"
 { finish_default_args (); ;
     break;}
 case 476:
-#line 2121 "parse.y"
+#line 2120 "parse.y"
 { yyval.ftype.t = yyvsp[-3].ttype;
                  yyval.ftype.new_type_flag = 1; 
                  begin_inline_definitions (); ;
     break;}
 case 477:
-#line 2125 "parse.y"
+#line 2124 "parse.y"
 {
                  yyval.ftype.new_type_flag = 0;
                  if (TYPE_BINFO (yyvsp[0].ttype) == NULL_TREE)
                    {
-                     cp_error (ec_is_not_a_class_type, yyvsp[0].ttype);
+                     cp_error ("%T is not a class type", yyvsp[0].ttype);
                      yyval.ftype.t = error_mark_node;
                    } 
                  else
@@ -6065,91 +6064,91 @@ case 477:
                      /* struct B: public A; is not accepted by the WP grammar.  */
                      if (TYPE_BINFO_BASETYPES (yyval.ftype.t) && !TYPE_SIZE (yyval.ftype.t)
                          && ! TYPE_BEING_DEFINED (yyval.ftype.t))
-                       cp_error (ec_base_clause_without_member_specification_for,
+                       cp_error ("base clause without member specification for `%#T'",
                                  yyval.ftype.t);
                    }
                ;
     break;}
 case 481:
-#line 2152 "parse.y"
+#line 2151 "parse.y"
 { if (pedantic && !in_system_header)
-                   cp_pedwarn (ec_comma_at_end_of_enumerator_list); ;
+                   pedwarn ("comma at end of enumerator list"); ;
     break;}
 case 483:
-#line 2159 "parse.y"
-{ cp_error (ec_storage_class_specifier_s_not_allowed_after_struct_or_class, IDENTIFIER_POINTER (yyvsp[0].ttype)); ;
+#line 2158 "parse.y"
+{ error ("storage class specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ;
     break;}
 case 484:
-#line 2161 "parse.y"
-{ cp_error (ec_type_specifier_s_not_allowed_after_struct_or_class, IDENTIFIER_POINTER (yyvsp[0].ttype)); ;
+#line 2160 "parse.y"
+{ error ("type specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ;
     break;}
 case 485:
-#line 2163 "parse.y"
-{ cp_error (ec_type_qualifier_s_not_allowed_after_struct_or_class, IDENTIFIER_POINTER (yyvsp[0].ttype)); ;
+#line 2162 "parse.y"
+{ error ("type qualifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ;
     break;}
 case 486:
-#line 2165 "parse.y"
-{ cp_error (ec_no_body_nor_separates_two_class_struct_or_union_declarations); ;
+#line 2164 "parse.y"
+{ error ("no body nor ';' separates two class, struct or union declarations"); ;
     break;}
 case 487:
-#line 2167 "parse.y"
+#line 2166 "parse.y"
 { yyval.ttype = build_decl_list (yyvsp[0].ttype, yyvsp[-1].ttype); ;
     break;}
 case 488:
-#line 2172 "parse.y"
+#line 2171 "parse.y"
 { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 489:
-#line 2177 "parse.y"
+#line 2176 "parse.y"
 { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 490:
-#line 2179 "parse.y"
+#line 2178 "parse.y"
 { yyungetc ('{', 1); ;
     break;}
 case 491:
-#line 2181 "parse.y"
+#line 2180 "parse.y"
 { yyungetc (':', 1); ;
     break;}
 case 492:
-#line 2186 "parse.y"
+#line 2185 "parse.y"
 {
                  current_aggr = yyvsp[-2].ttype;
                  yyval.ttype = handle_class_head (yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype);
                ;
     break;}
 case 493:
-#line 2191 "parse.y"
+#line 2190 "parse.y"
 {
                  current_aggr = yyvsp[-3].ttype;
                  yyval.ttype = handle_class_head (yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype);
                ;
     break;}
 case 494:
-#line 2196 "parse.y"
+#line 2195 "parse.y"
 {
                  current_aggr = yyvsp[-2].ttype;
                  yyval.ttype = handle_class_head (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype);
                ;
     break;}
 case 495:
-#line 2201 "parse.y"
+#line 2200 "parse.y"
 { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 496:
-#line 2203 "parse.y"
+#line 2202 "parse.y"
 { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 497:
-#line 2208 "parse.y"
+#line 2207 "parse.y"
 { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, 0); ;
     break;}
 case 498:
-#line 2213 "parse.y"
+#line 2212 "parse.y"
 { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, 1); ;
     break;}
 case 499:
-#line 2216 "parse.y"
+#line 2215 "parse.y"
 { 
                  yyval.ttype = yyvsp[-1].ttype;
                  if (yyvsp[0].ttype)
@@ -6157,15 +6156,15 @@ case 499:
                ;
     break;}
 case 500:
-#line 2222 "parse.y"
+#line 2221 "parse.y"
 { 
                  yyval.ttype = TREE_TYPE (yyvsp[-1].ttype);
                  if (TREE_INT_CST_LOW (current_aggr) == union_type 
                      && TREE_CODE (yyval.ttype) != UNION_TYPE)
-                   cp_pedwarn (ec_union_tag_used_in_declaring, yyval.ttype);
+                   cp_pedwarn ("`union' tag used in declaring `%#T'", yyval.ttype);
                  else if (TREE_CODE (yyval.ttype) == UNION_TYPE
                           && TREE_INT_CST_LOW (current_aggr) != union_type)
-                   cp_pedwarn (ec_nonunion_tag_used_in_declaring, yyval.ttype);
+                   cp_pedwarn ("non-`union' tag used in declaring `%#T'", yyval.ttype);
                  if (yyvsp[0].ttype)
                    {
                      maybe_process_partial_specialization (yyval.ttype);
@@ -6174,44 +6173,44 @@ case 500:
                ;
     break;}
 case 501:
-#line 2240 "parse.y"
+#line 2239 "parse.y"
 { yyval.ttype = xref_tag (yyval.ttype, make_anon_name (), 0);
                  yyungetc ('{', 1); ;
     break;}
 case 504:
-#line 2251 "parse.y"
+#line 2250 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 505:
-#line 2253 "parse.y"
+#line 2252 "parse.y"
 { yyungetc(':', 1); yyval.ttype = NULL_TREE; ;
     break;}
 case 506:
-#line 2255 "parse.y"
+#line 2254 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 508:
-#line 2261 "parse.y"
+#line 2260 "parse.y"
 { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 509:
-#line 2266 "parse.y"
+#line 2265 "parse.y"
 { yyval.ttype = finish_base_specifier (access_default_node, yyvsp[0].ttype,
                                              current_aggr 
                                              == signature_type_node); ;
     break;}
 case 510:
-#line 2270 "parse.y"
+#line 2269 "parse.y"
 { yyval.ttype = finish_base_specifier (yyvsp[-2].ttype, yyvsp[0].ttype, 
                                              current_aggr 
                                              == signature_type_node); ;
     break;}
 case 511:
-#line 2277 "parse.y"
+#line 2276 "parse.y"
 { yyval.ttype = TYPE_MAIN_DECL (yyvsp[0].ttype); ;
     break;}
 case 513:
-#line 2280 "parse.y"
+#line 2279 "parse.y"
 {
                  if (current_aggr == signature_type_node)
                    {
@@ -6222,19 +6221,19 @@ case 513:
                        }
                      else
                        {
-                         cp_error (ec_sigof_applied_to_nonaggregate_expression);
+                         error ("`sigof' applied to non-aggregate expression");
                          yyval.ttype = error_mark_node;
                        }
                    }
                  else
                    {
-                     cp_error (ec_sigof_in_struct_or_class_declaration);
+                     error ("`sigof' in struct or class declaration");
                      yyval.ttype = error_mark_node;
                    }
                ;
     break;}
 case 514:
-#line 2301 "parse.y"
+#line 2300 "parse.y"
 {
                  if (current_aggr == signature_type_node)
                    {
@@ -6245,28 +6244,28 @@ case 514:
                        }
                      else
                        {
-                         cp_error (ec_sigof_applied_to_nonaggregate_expression);
+                         error ("`sigof' applied to non-aggregate expression");
                          yyval.ttype = error_mark_node;
                        }
                    }
                  else
                    {
-                     cp_error (ec_sigof_in_struct_or_class_declaration);
+                     error ("`sigof' in struct or class declaration");
                      yyval.ttype = error_mark_node;
                    }
                ;
     break;}
 case 516:
-#line 2326 "parse.y"
+#line 2325 "parse.y"
 { if (yyvsp[-1].ttype != ridpointers[(int)RID_VIRTUAL])
-                   cp_error (ec_access, yyvsp[-1].ttype);
+                   cp_error ("`%D' access", yyvsp[-1].ttype);
                  yyval.ttype = access_default_virtual_node; ;
     break;}
 case 517:
-#line 2330 "parse.y"
+#line 2329 "parse.y"
 {
                  if (yyvsp[-2].ttype != access_default_virtual_node)
-                   cp_error (ec_multiple_access_specifiers);
+                   error ("multiple access specifiers");
                  else if (yyvsp[-1].ttype == access_public_node)
                    yyval.ttype = access_public_virtual_node;
                  else if (yyvsp[-1].ttype == access_protected_node)
@@ -6276,9 +6275,9 @@ case 517:
                ;
     break;}
 case 518:
-#line 2341 "parse.y"
+#line 2340 "parse.y"
 { if (yyvsp[-1].ttype != ridpointers[(int)RID_VIRTUAL])
-                   cp_error (ec_access, yyvsp[-1].ttype);
+                   cp_error ("`%D' access", yyvsp[-1].ttype);
                  else if (yyval.ttype == access_public_node)
                    yyval.ttype = access_public_virtual_node;
                  else if (yyval.ttype == access_protected_node)
@@ -6286,25 +6285,25 @@ case 518:
                  else if (yyval.ttype == access_private_node)
                    yyval.ttype = access_private_virtual_node;
                  else
-                   cp_error (ec_multiple_virtual_specifiers);
+                   error ("multiple `virtual' specifiers");
                ;
     break;}
 case 519:
-#line 2356 "parse.y"
+#line 2355 "parse.y"
 { yyvsp[-1].ttype = begin_class_definition (yyvsp[-1].ttype); ;
     break;}
 case 520:
-#line 2361 "parse.y"
+#line 2360 "parse.y"
 {
                    yyval.ttype = build_self_reference ();
                ;
     break;}
 case 521:
-#line 2368 "parse.y"
+#line 2367 "parse.y"
 { if (yyval.ttype) yyval.ttype = build_tree_list (access_public_node, yyval.ttype); ;
     break;}
 case 522:
-#line 2370 "parse.y"
+#line 2369 "parse.y"
 {
                  if (current_aggr == signature_type_node)
                    yyval.ttype = build_tree_list (access_public_node, yyvsp[0].ttype);
@@ -6314,32 +6313,32 @@ case 522:
                ;
     break;}
 case 523:
-#line 2378 "parse.y"
+#line 2377 "parse.y"
 {
                  tree visspec = yyvsp[-2].ttype;
 
                  if (current_aggr == signature_type_node)
                    {
-                     cp_error (ec_access_specifier_not_allowed_in_signature);
+                     error ("access specifier not allowed in signature");
                      visspec = access_public_node;
                    }
                  yyval.ttype = chainon (yyval.ttype, build_tree_list (visspec, yyvsp[0].ttype));
                ;
     break;}
 case 524:
-#line 2389 "parse.y"
+#line 2388 "parse.y"
 {
                  if (current_aggr == signature_type_node)
-                   cp_error (ec_access_specifier_not_allowed_in_signature);
+                   error ("access specifier not allowed in signature");
                ;
     break;}
 case 525:
-#line 2399 "parse.y"
+#line 2398 "parse.y"
 { if (yyval.ttype == void_type_node) yyval.ttype = NULL_TREE; 
                ;
     break;}
 case 526:
-#line 2402 "parse.y"
+#line 2401 "parse.y"
 { /* In pushdecl, we created a reverse list of names
                     in this binding level.  Make sure that the chain
                     of what we're trying to add isn't the item itself
@@ -6354,95 +6353,95 @@ case 526:
                ;
     break;}
 case 527:
-#line 2418 "parse.y"
+#line 2417 "parse.y"
 { ;
     break;}
 case 528:
-#line 2420 "parse.y"
-{ cp_error (ec_missing_before_right_brace);
+#line 2419 "parse.y"
+{ error ("missing ';' before right brace");
                  yyungetc ('}', 0); ;
     break;}
 case 529:
-#line 2425 "parse.y"
+#line 2424 "parse.y"
 { yyval.ttype = finish_method (yyval.ttype); ;
     break;}
 case 530:
-#line 2427 "parse.y"
+#line 2426 "parse.y"
 { yyval.ttype = finish_method (yyval.ttype); ;
     break;}
 case 531:
-#line 2429 "parse.y"
+#line 2428 "parse.y"
 { yyval.ttype = finish_method (yyval.ttype); ;
     break;}
 case 532:
-#line 2431 "parse.y"
+#line 2430 "parse.y"
 { yyval.ttype = finish_method (yyval.ttype); ;
     break;}
 case 533:
-#line 2433 "parse.y"
+#line 2432 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 534:
-#line 2435 "parse.y"
+#line 2434 "parse.y"
 { yyval.ttype = yyvsp[0].ttype;
                  pedantic = yyvsp[-1].itype; ;
     break;}
 case 535:
-#line 2438 "parse.y"
+#line 2437 "parse.y"
 { yyval.ttype = finish_member_template_decl (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 536:
-#line 2440 "parse.y"
+#line 2439 "parse.y"
 { yyval.ttype = finish_member_class_template (yyvsp[-2].ttype, yyvsp[-1].ftype.t); ;
     break;}
 case 537:
-#line 2448 "parse.y"
+#line 2447 "parse.y"
 { yyval.ttype = grok_x_components (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 538:
-#line 2450 "parse.y"
+#line 2449 "parse.y"
 { yyval.ttype = grok_x_components (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 539:
-#line 2452 "parse.y"
+#line 2451 "parse.y"
 { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype,
                                  build_tree_list (yyvsp[-1].ttype, NULL_TREE)); ;
     break;}
 case 540:
-#line 2455 "parse.y"
+#line 2454 "parse.y"
 { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype,
                                  build_tree_list (yyvsp[-1].ttype, NULL_TREE)); ;
     break;}
 case 541:
-#line 2458 "parse.y"
+#line 2457 "parse.y"
 { yyval.ttype = grokbitfield (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 542:
-#line 2460 "parse.y"
+#line 2459 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 543:
-#line 2471 "parse.y"
+#line 2470 "parse.y"
 { tree specs, attrs;
                  split_specs_attrs (yyvsp[-4].ttype, &specs, &attrs);
                  yyval.ttype = grokfield (yyvsp[-3].ttype, specs, yyvsp[0].ttype, yyvsp[-2].ttype,
                                  build_tree_list (yyvsp[-1].ttype, attrs)); ;
     break;}
 case 544:
-#line 2476 "parse.y"
+#line 2475 "parse.y"
 { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype,
                                  build_tree_list (yyvsp[-1].ttype, NULL_TREE)); ;
     break;}
 case 545:
-#line 2479 "parse.y"
+#line 2478 "parse.y"
 { yyval.ttype = do_class_using_decl (yyvsp[0].ttype); ;
     break;}
 case 546:
-#line 2485 "parse.y"
+#line 2484 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 548:
-#line 2488 "parse.y"
+#line 2487 "parse.y"
 {
                  /* In this context, void_type_node encodes
                     friends.  They have been recorded elsewhere.  */
@@ -6453,11 +6452,11 @@ case 548:
                ;
     break;}
 case 549:
-#line 2500 "parse.y"
+#line 2499 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 551:
-#line 2503 "parse.y"
+#line 2502 "parse.y"
 {
                  /* In this context, void_type_node encodes
                     friends.  They have been recorded elsewhere.  */
@@ -6468,7 +6467,7 @@ case 551:
                ;
     break;}
 case 556:
-#line 2525 "parse.y"
+#line 2524 "parse.y"
 { split_specs_attrs (yyvsp[-4].ttype, &current_declspecs,
                                     &prefix_attributes);
                  yyvsp[-4].ttype = current_declspecs;
@@ -6476,7 +6475,7 @@ case 556:
                                  build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ;
     break;}
 case 557:
-#line 2531 "parse.y"
+#line 2530 "parse.y"
 { split_specs_attrs (yyvsp[-4].ttype, &current_declspecs,
                                     &prefix_attributes);
                  yyvsp[-4].ttype = current_declspecs;
@@ -6484,7 +6483,7 @@ case 557:
                  cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ;
     break;}
 case 558:
-#line 2540 "parse.y"
+#line 2539 "parse.y"
 { split_specs_attrs (yyvsp[-4].ttype, &current_declspecs,
                                     &prefix_attributes);
                  yyvsp[-4].ttype = current_declspecs;
@@ -6492,7 +6491,7 @@ case 558:
                                  build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ;
     break;}
 case 559:
-#line 2546 "parse.y"
+#line 2545 "parse.y"
 { split_specs_attrs (yyvsp[-4].ttype, &current_declspecs,
                                     &prefix_attributes);
                  yyvsp[-4].ttype = current_declspecs;
@@ -6500,7 +6499,7 @@ case 559:
                                  build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ;
     break;}
 case 560:
-#line 2552 "parse.y"
+#line 2551 "parse.y"
 { split_specs_attrs (yyvsp[-4].ttype, &current_declspecs,
                                     &prefix_attributes);
                  yyvsp[-4].ttype = current_declspecs;
@@ -6508,7 +6507,7 @@ case 560:
                  cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ;
     break;}
 case 561:
-#line 2558 "parse.y"
+#line 2557 "parse.y"
 { split_specs_attrs (yyvsp[-3].ttype, &current_declspecs,
                                     &prefix_attributes);
                  yyvsp[-3].ttype = current_declspecs;
@@ -6516,128 +6515,128 @@ case 561:
                  cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ;
     break;}
 case 562:
-#line 2567 "parse.y"
+#line 2566 "parse.y"
 { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[0].ttype, yyvsp[-2].ttype,
                                  build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ;
     break;}
 case 563:
-#line 2570 "parse.y"
+#line 2569 "parse.y"
 { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype);
                  cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ;
     break;}
 case 564:
-#line 2576 "parse.y"
+#line 2575 "parse.y"
 { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[0].ttype, yyvsp[-2].ttype,
                                  build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ;
     break;}
 case 565:
-#line 2579 "parse.y"
+#line 2578 "parse.y"
 { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype);
                  cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ;
     break;}
 case 566:
-#line 2582 "parse.y"
+#line 2581 "parse.y"
 { yyval.ttype = grokbitfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype);
                  cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ;
     break;}
 case 568:
-#line 2593 "parse.y"
+#line 2592 "parse.y"
 { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 569:
-#line 2598 "parse.y"
+#line 2597 "parse.y"
 { yyval.ttype = build_enumerator (yyval.ttype, NULL_TREE, current_enum_type); ;
     break;}
 case 570:
-#line 2600 "parse.y"
+#line 2599 "parse.y"
 { yyval.ttype = build_enumerator (yyval.ttype, yyvsp[0].ttype, current_enum_type); ;
     break;}
 case 571:
-#line 2606 "parse.y"
+#line 2605 "parse.y"
 { yyval.ftype.t = build_decl_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 572:
-#line 2609 "parse.y"
+#line 2608 "parse.y"
 { yyval.ftype.t = build_decl_list (yyvsp[0].ftype.t, NULL_TREE); 
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
     break;}
 case 573:
-#line 2616 "parse.y"
+#line 2615 "parse.y"
 {
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_array_dimensions_with_parenthesized_type_in_new);
+                   pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new");
                  yyval.ftype.t = build_parse_node (ARRAY_REF, TREE_VALUE (yyvsp[-4].ftype.t), yyvsp[-1].ttype);
                  yyval.ftype.t = build_decl_list (TREE_PURPOSE (yyvsp[-4].ftype.t), yyval.ftype.t);
                  yyval.ftype.new_type_flag = yyvsp[-4].ftype.new_type_flag;
                ;
     break;}
 case 574:
-#line 2627 "parse.y"
+#line 2626 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 575:
-#line 2629 "parse.y"
+#line 2628 "parse.y"
 { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
     break;}
 case 576:
-#line 2634 "parse.y"
+#line 2633 "parse.y"
 { yyval.ftype.t = IDENTIFIER_AS_LIST (yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = 0; ;
     break;}
 case 577:
-#line 2637 "parse.y"
+#line 2636 "parse.y"
 { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ftype.t); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 578:
-#line 2646 "parse.y"
+#line 2645 "parse.y"
 { yyval.itype = suspend_momentary (); ;
     break;}
 case 579:
-#line 2651 "parse.y"
+#line 2650 "parse.y"
 { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 580:
-#line 2657 "parse.y"
+#line 2656 "parse.y"
 { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 581:
-#line 2659 "parse.y"
+#line 2658 "parse.y"
 { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 582:
-#line 2661 "parse.y"
+#line 2660 "parse.y"
 { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = empty_parms (); ;
     break;}
 case 583:
-#line 2663 "parse.y"
+#line 2662 "parse.y"
 { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = NULL_TREE; ;
     break;}
 case 584:
-#line 2670 "parse.y"
+#line 2669 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 585:
-#line 2672 "parse.y"
+#line 2671 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 586:
-#line 2674 "parse.y"
+#line 2673 "parse.y"
 { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 587:
-#line 2676 "parse.y"
+#line 2675 "parse.y"
 { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 588:
-#line 2678 "parse.y"
+#line 2677 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
                ;
     break;}
 case 590:
-#line 2686 "parse.y"
+#line 2685 "parse.y"
 {
                  if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
                    {
@@ -6656,7 +6655,7 @@ case 590:
                ;
     break;}
 case 591:
-#line 2703 "parse.y"
+#line 2702 "parse.y"
 {
                  if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
                    yyval.ttype = IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype);
@@ -6666,152 +6665,152 @@ case 591:
                ;
     break;}
 case 594:
-#line 2716 "parse.y"
+#line 2715 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 595:
-#line 2721 "parse.y"
+#line 2720 "parse.y"
 { yyval.ttype = get_type_decl (yyvsp[0].ttype); ;
     break;}
 case 596:
-#line 2726 "parse.y"
+#line 2725 "parse.y"
 { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 597:
-#line 2728 "parse.y"
+#line 2727 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 598:
-#line 2730 "parse.y"
+#line 2729 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ;
     break;}
 case 599:
-#line 2732 "parse.y"
+#line 2731 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 600:
-#line 2734 "parse.y"
+#line 2733 "parse.y"
 { push_nested_class (yyvsp[-1].ttype, 3);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype);
                  TREE_COMPLEXITY (yyval.ttype) = current_class_depth; ;
     break;}
 case 602:
-#line 2745 "parse.y"
+#line 2744 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 603:
-#line 2747 "parse.y"
+#line 2746 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 604:
-#line 2749 "parse.y"
+#line 2748 "parse.y"
 { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 605:
-#line 2751 "parse.y"
+#line 2750 "parse.y"
 { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 606:
-#line 2753 "parse.y"
+#line 2752 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
                ;
     break;}
 case 608:
-#line 2761 "parse.y"
+#line 2760 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 609:
-#line 2763 "parse.y"
+#line 2762 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 610:
-#line 2765 "parse.y"
+#line 2764 "parse.y"
 { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 611:
-#line 2767 "parse.y"
+#line 2766 "parse.y"
 { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 612:
-#line 2769 "parse.y"
+#line 2768 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
                ;
     break;}
 case 614:
-#line 2777 "parse.y"
+#line 2776 "parse.y"
 { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 615:
-#line 2779 "parse.y"
+#line 2778 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 616:
-#line 2781 "parse.y"
+#line 2780 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 617:
-#line 2783 "parse.y"
+#line 2782 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ;
     break;}
 case 618:
-#line 2785 "parse.y"
+#line 2784 "parse.y"
 { enter_scope_of (yyvsp[0].ttype); ;
     break;}
 case 619:
-#line 2787 "parse.y"
+#line 2786 "parse.y"
 { got_scope = NULL_TREE;
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype);
                  enter_scope_of (yyval.ttype);
                ;
     break;}
 case 620:
-#line 2795 "parse.y"
+#line 2794 "parse.y"
 { got_scope = NULL_TREE;
                  yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 621:
-#line 2798 "parse.y"
+#line 2797 "parse.y"
 { got_scope = NULL_TREE;
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 622:
-#line 2804 "parse.y"
+#line 2803 "parse.y"
 { got_scope = NULL_TREE;
                  yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 623:
-#line 2807 "parse.y"
+#line 2806 "parse.y"
 { got_scope = NULL_TREE;
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 625:
-#line 2814 "parse.y"
+#line 2813 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 626:
-#line 2819 "parse.y"
+#line 2818 "parse.y"
 { yyval.ttype = build_functional_cast (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ;
     break;}
 case 627:
-#line 2821 "parse.y"
+#line 2820 "parse.y"
 { yyval.ttype = reparse_decl_as_expr (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ;
     break;}
 case 628:
-#line 2823 "parse.y"
+#line 2822 "parse.y"
 { yyval.ttype = reparse_absdcl_as_expr (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 633:
-#line 2834 "parse.y"
+#line 2833 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 634:
-#line 2836 "parse.y"
+#line 2835 "parse.y"
 { got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 635:
-#line 2843 "parse.y"
+#line 2842 "parse.y"
 {
                  if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE)
                    {
@@ -6827,7 +6826,7 @@ case 635:
                ;
     break;}
 case 636:
-#line 2857 "parse.y"
+#line 2856 "parse.y"
 {
                  if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE)
                    yyval.ttype = lastiddecl;
@@ -6835,7 +6834,7 @@ case 636:
                ;
     break;}
 case 637:
-#line 2863 "parse.y"
+#line 2862 "parse.y"
 {
                  if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE)
                    yyval.ttype = lastiddecl;
@@ -6843,20 +6842,20 @@ case 637:
                ;
     break;}
 case 638:
-#line 2869 "parse.y"
+#line 2868 "parse.y"
 { got_scope = yyval.ttype = complete_type (TREE_TYPE (yyvsp[-1].ttype)); ;
     break;}
 case 640:
-#line 2885 "parse.y"
+#line 2884 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 641:
-#line 2890 "parse.y"
+#line 2889 "parse.y"
 {
                  if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't')
                    yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype);
                  else if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
-                   cp_error (ec_is_not_a_class_or_namespace, yyvsp[0].ttype);
+                   cp_error ("`%T' is not a class or namespace", yyvsp[0].ttype);
                  else
                    {
                      yyval.ttype = yyvsp[0].ttype;
@@ -6866,31 +6865,31 @@ case 641:
                ;
     break;}
 case 642:
-#line 2903 "parse.y"
+#line 2902 "parse.y"
 { yyval.ttype = TREE_TYPE (yyvsp[0].ttype); ;
     break;}
 case 643:
-#line 2905 "parse.y"
+#line 2904 "parse.y"
 { yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 644:
-#line 2907 "parse.y"
+#line 2906 "parse.y"
 { yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[0].ttype); ;
     break;}
 case 645:
-#line 2912 "parse.y"
+#line 2911 "parse.y"
 {
                  if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
-                   cp_error (ec_is_not_a_class_or_namespace, yyvsp[0].ttype);
+                   cp_error ("`%T' is not a class or namespace", yyvsp[0].ttype);
                ;
     break;}
 case 646:
-#line 2917 "parse.y"
+#line 2916 "parse.y"
 {
                  if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't')
                    yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype);
                  else if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
-                   cp_error (ec_is_not_a_class_or_namespace, yyvsp[0].ttype);
+                   cp_error ("`%T' is not a class or namespace", yyvsp[0].ttype);
                  else
                    {
                      yyval.ttype = yyvsp[0].ttype;
@@ -6900,15 +6899,15 @@ case 646:
                ;
     break;}
 case 647:
-#line 2930 "parse.y"
+#line 2929 "parse.y"
 { got_scope = yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
     break;}
 case 648:
-#line 2932 "parse.y"
+#line 2931 "parse.y"
 { got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 649:
-#line 2937 "parse.y"
+#line 2936 "parse.y"
 {
                  if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE)
                    yyvsp[-1].ttype = lastiddecl;
@@ -6918,11 +6917,11 @@ case 649:
                  got_scope = yyval.ttype = complete_type (IDENTIFIER_TYPE_VALUE (yyvsp[-1].ttype));
 
                  if (yyval.ttype == error_mark_node)
-                   cp_error (ec_is_not_a_class_or_namespace, yyvsp[-1].ttype);
+                   cp_error ("`%T' is not a class or namespace", yyvsp[-1].ttype);
                ;
     break;}
 case 650:
-#line 2949 "parse.y"
+#line 2948 "parse.y"
 {
                  if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE)
                    yyval.ttype = lastiddecl;
@@ -6930,11 +6929,11 @@ case 650:
                ;
     break;}
 case 651:
-#line 2955 "parse.y"
+#line 2954 "parse.y"
 { got_scope = yyval.ttype = complete_type (TREE_TYPE (yyval.ttype)); ;
     break;}
 case 654:
-#line 2959 "parse.y"
+#line 2958 "parse.y"
 {
                  if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE)
                    yyval.ttype = lastiddecl;
@@ -6942,11 +6941,11 @@ case 654:
                ;
     break;}
 case 655:
-#line 2968 "parse.y"
+#line 2967 "parse.y"
 { yyval.ttype = build_min_nt (TEMPLATE_ID_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 656:
-#line 2973 "parse.y"
+#line 2972 "parse.y"
 {
                  if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
                    yyval.ttype = IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype);
@@ -6956,148 +6955,148 @@ case 656:
                ;
     break;}
 case 658:
-#line 2982 "parse.y"
+#line 2981 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 659:
-#line 2987 "parse.y"
+#line 2986 "parse.y"
 { got_scope = NULL_TREE; ;
     break;}
 case 660:
-#line 2989 "parse.y"
+#line 2988 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; got_scope = NULL_TREE; ;
     break;}
 case 661:
-#line 2996 "parse.y"
+#line 2995 "parse.y"
 { got_scope = void_type_node; ;
     break;}
 case 662:
-#line 3002 "parse.y"
+#line 3001 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 663:
-#line 3004 "parse.y"
+#line 3003 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;
     break;}
 case 664:
-#line 3006 "parse.y"
+#line 3005 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 665:
-#line 3008 "parse.y"
+#line 3007 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ;
     break;}
 case 666:
-#line 3010 "parse.y"
+#line 3009 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg);
                ;
     break;}
 case 667:
-#line 3014 "parse.y"
+#line 3013 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
                ;
     break;}
 case 669:
-#line 3023 "parse.y"
+#line 3022 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
     break;}
 case 670:
-#line 3025 "parse.y"
+#line 3024 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 671:
-#line 3031 "parse.y"
+#line 3030 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 672:
-#line 3033 "parse.y"
+#line 3032 "parse.y"
 { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 673:
-#line 3035 "parse.y"
+#line 3034 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[0].ftype.t, NULL_TREE); ;
     break;}
 case 674:
-#line 3037 "parse.y"
+#line 3036 "parse.y"
 { yyval.ttype = make_pointer_declarator (NULL_TREE, NULL_TREE); ;
     break;}
 case 675:
-#line 3039 "parse.y"
+#line 3038 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 676:
-#line 3041 "parse.y"
+#line 3040 "parse.y"
 { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ;
     break;}
 case 677:
-#line 3043 "parse.y"
+#line 3042 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[0].ftype.t, NULL_TREE); ;
     break;}
 case 678:
-#line 3045 "parse.y"
+#line 3044 "parse.y"
 { yyval.ttype = make_reference_declarator (NULL_TREE, NULL_TREE); ;
     break;}
 case 679:
-#line 3047 "parse.y"
+#line 3046 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg);
                ;
     break;}
 case 680:
-#line 3051 "parse.y"
+#line 3050 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
                ;
     break;}
 case 682:
-#line 3060 "parse.y"
+#line 3059 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 684:
-#line 3064 "parse.y"
+#line 3063 "parse.y"
 { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 685:
-#line 3066 "parse.y"
+#line 3065 "parse.y"
 { yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 686:
-#line 3068 "parse.y"
+#line 3067 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 687:
-#line 3070 "parse.y"
+#line 3069 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ;
     break;}
 case 688:
-#line 3072 "parse.y"
+#line 3071 "parse.y"
 { yyval.ttype = make_call_declarator (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 689:
-#line 3074 "parse.y"
+#line 3073 "parse.y"
 { set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 690:
-#line 3076 "parse.y"
+#line 3075 "parse.y"
 { set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 691:
-#line 3078 "parse.y"
+#line 3077 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
     break;}
 case 692:
-#line 3080 "parse.y"
+#line 3079 "parse.y"
 { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, NULL_TREE); ;
     break;}
 case 699:
-#line 3103 "parse.y"
+#line 3102 "parse.y"
 { if (pedantic)
-                   cp_pedwarn (ec_forbids_label_declarations); ;
+                   pedwarn ("ANSI C++ forbids label declarations"); ;
     break;}
 case 702:
-#line 3114 "parse.y"
+#line 3113 "parse.y"
 { tree link;
                  for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link))
                    {
@@ -7108,211 +7107,211 @@ case 702:
                ;
     break;}
 case 703:
-#line 3128 "parse.y"
+#line 3127 "parse.y"
 {;
     break;}
 case 705:
-#line 3134 "parse.y"
+#line 3133 "parse.y"
 { yyval.ttype = begin_compound_stmt (0); ;
     break;}
 case 706:
-#line 3136 "parse.y"
+#line 3135 "parse.y"
 { yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ;
     break;}
 case 707:
-#line 3141 "parse.y"
+#line 3140 "parse.y"
 {
                  yyval.ttype = begin_if_stmt ();
                  cond_stmt_keyword = "if";
                ;
     break;}
 case 708:
-#line 3146 "parse.y"
+#line 3145 "parse.y"
 { finish_if_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ;
     break;}
 case 709:
-#line 3148 "parse.y"
+#line 3147 "parse.y"
 { yyval.ttype = finish_then_clause (yyvsp[-3].ttype); ;
     break;}
 case 711:
-#line 3153 "parse.y"
+#line 3152 "parse.y"
 { yyval.ttype = begin_compound_stmt (0); ;
     break;}
 case 712:
-#line 3155 "parse.y"
+#line 3154 "parse.y"
 { yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ;
     break;}
 case 713:
-#line 3160 "parse.y"
+#line 3159 "parse.y"
 {;
     break;}
 case 715:
-#line 3166 "parse.y"
+#line 3165 "parse.y"
 { finish_stmt (); ;
     break;}
 case 716:
-#line 3168 "parse.y"
+#line 3167 "parse.y"
 { finish_expr_stmt (yyvsp[-1].ttype); ;
     break;}
 case 717:
-#line 3170 "parse.y"
+#line 3169 "parse.y"
 { begin_else_clause (); ;
     break;}
 case 718:
-#line 3172 "parse.y"
+#line 3171 "parse.y"
 { 
                  finish_else_clause (yyvsp[-3].ttype); 
                  finish_if_stmt ();
                ;
     break;}
 case 719:
-#line 3177 "parse.y"
+#line 3176 "parse.y"
 { finish_if_stmt (); ;
     break;}
 case 720:
-#line 3179 "parse.y"
+#line 3178 "parse.y"
 {
                  yyval.ttype = begin_while_stmt ();
                  cond_stmt_keyword = "while";
                ;
     break;}
 case 721:
-#line 3184 "parse.y"
+#line 3183 "parse.y"
 { finish_while_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ;
     break;}
 case 722:
-#line 3186 "parse.y"
+#line 3185 "parse.y"
 { finish_while_stmt (yyvsp[-3].ttype); ;
     break;}
 case 723:
-#line 3188 "parse.y"
+#line 3187 "parse.y"
 { yyval.ttype = begin_do_stmt (); ;
     break;}
 case 724:
-#line 3190 "parse.y"
+#line 3189 "parse.y"
 {
                  finish_do_body (yyvsp[-2].ttype);
                  cond_stmt_keyword = "do";
                ;
     break;}
 case 725:
-#line 3195 "parse.y"
+#line 3194 "parse.y"
 { finish_do_stmt (yyvsp[-1].ttype, yyvsp[-5].ttype); ;
     break;}
 case 726:
-#line 3197 "parse.y"
+#line 3196 "parse.y"
 { yyval.ttype = begin_for_stmt (); ;
     break;}
 case 727:
-#line 3199 "parse.y"
+#line 3198 "parse.y"
 { finish_for_init_stmt (yyvsp[-2].ttype); ;
     break;}
 case 728:
-#line 3201 "parse.y"
+#line 3200 "parse.y"
 { finish_for_cond (yyvsp[-1].ttype, yyvsp[-5].ttype); ;
     break;}
 case 729:
-#line 3203 "parse.y"
+#line 3202 "parse.y"
 { finish_for_expr (yyvsp[-1].ttype, yyvsp[-8].ttype); ;
     break;}
 case 730:
-#line 3205 "parse.y"
+#line 3204 "parse.y"
 { finish_for_stmt (yyvsp[-3].ttype, yyvsp[-10].ttype); ;
     break;}
 case 731:
-#line 3207 "parse.y"
+#line 3206 "parse.y"
 { begin_switch_stmt (); ;
     break;}
 case 732:
-#line 3209 "parse.y"
+#line 3208 "parse.y"
 { yyval.ttype = finish_switch_cond (yyvsp[-1].ttype); ;
     break;}
 case 733:
-#line 3211 "parse.y"
+#line 3210 "parse.y"
 { finish_switch_stmt (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 734:
-#line 3213 "parse.y"
+#line 3212 "parse.y"
 { finish_case_label (yyvsp[-1].ttype, NULL_TREE); ;
     break;}
 case 736:
-#line 3216 "parse.y"
+#line 3215 "parse.y"
 { finish_case_label (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
     break;}
 case 738:
-#line 3219 "parse.y"
+#line 3218 "parse.y"
 { finish_case_label (NULL_TREE, NULL_TREE); ;
     break;}
 case 740:
-#line 3222 "parse.y"
+#line 3221 "parse.y"
 { finish_break_stmt (); ;
     break;}
 case 741:
-#line 3224 "parse.y"
+#line 3223 "parse.y"
 { finish_continue_stmt (); ;
     break;}
 case 742:
-#line 3226 "parse.y"
+#line 3225 "parse.y"
 { finish_return_stmt (NULL_TREE); ;
     break;}
 case 743:
-#line 3228 "parse.y"
+#line 3227 "parse.y"
 { finish_return_stmt (yyvsp[-1].ttype); ;
     break;}
 case 744:
-#line 3230 "parse.y"
+#line 3229 "parse.y"
 { 
                  finish_asm_stmt (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE,
                                   NULL_TREE); 
                ;
     break;}
 case 745:
-#line 3236 "parse.y"
+#line 3235 "parse.y"
 { 
                  finish_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE,
                                   NULL_TREE); 
                ;
     break;}
 case 746:
-#line 3242 "parse.y"
+#line 3241 "parse.y"
 { finish_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ;
     break;}
 case 747:
-#line 3246 "parse.y"
+#line 3245 "parse.y"
 { finish_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ;
     break;}
 case 748:
-#line 3248 "parse.y"
+#line 3247 "parse.y"
 { 
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_computed_gotos);
+                   pedwarn ("ANSI C++ forbids computed gotos");
                  finish_goto_stmt (yyvsp[-1].ttype);
                ;
     break;}
 case 749:
-#line 3254 "parse.y"
+#line 3253 "parse.y"
 { finish_goto_stmt (yyvsp[-1].ttype); ;
     break;}
 case 750:
-#line 3256 "parse.y"
+#line 3255 "parse.y"
 { finish_stmt (); ;
     break;}
 case 751:
-#line 3258 "parse.y"
-{ cp_error (ec_label_must_be_followed_by_statement);
+#line 3257 "parse.y"
+{ error ("label must be followed by statement");
                  yyungetc ('}', 0);
                  finish_stmt (); ;
     break;}
 case 752:
-#line 3262 "parse.y"
+#line 3261 "parse.y"
 { finish_stmt (); ;
     break;}
 case 755:
-#line 3266 "parse.y"
+#line 3265 "parse.y"
 { do_local_using_decl (yyvsp[0].ttype); ;
     break;}
 case 757:
-#line 3272 "parse.y"
+#line 3271 "parse.y"
 {
                  if (! current_function_parms_stored)
                    store_parm_decls ();
@@ -7320,13 +7319,13 @@ case 757:
                ;
     break;}
 case 758:
-#line 3278 "parse.y"
+#line 3277 "parse.y"
 { 
                   expand_start_all_catch (); 
                 ;
     break;}
 case 759:
-#line 3282 "parse.y"
+#line 3281 "parse.y"
 {
                  int nested = (hack_decl_function_context
                                (current_function_decl) != NULL_TREE);
@@ -7335,41 +7334,41 @@ case 759:
                ;
     break;}
 case 760:
-#line 3292 "parse.y"
+#line 3291 "parse.y"
 { yyval.ttype = begin_try_block (); ;
     break;}
 case 761:
-#line 3294 "parse.y"
+#line 3293 "parse.y"
 { finish_try_block (yyvsp[-1].ttype); ;
     break;}
 case 762:
-#line 3296 "parse.y"
+#line 3295 "parse.y"
 { finish_handler_sequence (yyvsp[-3].ttype); ;
     break;}
 case 765:
-#line 3306 "parse.y"
+#line 3305 "parse.y"
 { yyval.ttype = begin_handler(); ;
     break;}
 case 766:
-#line 3308 "parse.y"
+#line 3307 "parse.y"
 { finish_handler_parms (yyvsp[-1].ttype); ;
     break;}
 case 767:
-#line 3310 "parse.y"
+#line 3309 "parse.y"
 { finish_handler (yyvsp[-3].ttype); ;
     break;}
 case 770:
-#line 3320 "parse.y"
+#line 3319 "parse.y"
 { expand_start_catch_block (NULL_TREE, NULL_TREE); ;
     break;}
 case 771:
-#line 3336 "parse.y"
+#line 3335 "parse.y"
 { check_for_new_type ("inside exception declarations", yyvsp[-1].ftype);
                  expand_start_catch_block (TREE_PURPOSE (yyvsp[-1].ftype.t),
                                            TREE_VALUE (yyvsp[-1].ftype.t)); ;
     break;}
 case 772:
-#line 3343 "parse.y"
+#line 3342 "parse.y"
 { tree label;
                do_label:
                  label = define_label (input_filename, lineno, yyvsp[-1].ttype);
@@ -7378,98 +7377,98 @@ case 772:
                ;
     break;}
 case 773:
-#line 3350 "parse.y"
+#line 3349 "parse.y"
 { goto do_label; ;
     break;}
 case 774:
-#line 3352 "parse.y"
+#line 3351 "parse.y"
 { goto do_label; ;
     break;}
 case 775:
-#line 3354 "parse.y"
+#line 3353 "parse.y"
 { goto do_label; ;
     break;}
 case 776:
-#line 3359 "parse.y"
+#line 3358 "parse.y"
 { if (yyvsp[-1].ttype) cplus_expand_expr_stmt (yyvsp[-1].ttype); ;
     break;}
 case 778:
-#line 3362 "parse.y"
+#line 3361 "parse.y"
 { if (pedantic)
-                   cp_pedwarn (ec_forbids_compound_statements_inside_for_initializations);
+                   pedwarn ("ANSI C++ forbids compound statements inside for initializations");
                ;
     break;}
 case 779:
-#line 3371 "parse.y"
+#line 3370 "parse.y"
 { emit_line_note (input_filename, lineno);
                  yyval.ttype = NULL_TREE; ;
     break;}
 case 780:
-#line 3374 "parse.y"
+#line 3373 "parse.y"
 { emit_line_note (input_filename, lineno); ;
     break;}
 case 781:
-#line 3379 "parse.y"
+#line 3378 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 783:
-#line 3382 "parse.y"
+#line 3381 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 784:
-#line 3389 "parse.y"
+#line 3388 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 787:
-#line 3396 "parse.y"
+#line 3395 "parse.y"
 { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ;
     break;}
 case 788:
-#line 3401 "parse.y"
+#line 3400 "parse.y"
 { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[-1].ttype); ;
     break;}
 case 789:
-#line 3406 "parse.y"
+#line 3405 "parse.y"
 { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, NULL_TREE); ;
     break;}
 case 790:
-#line 3408 "parse.y"
+#line 3407 "parse.y"
 { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
     break;}
 case 791:
-#line 3419 "parse.y"
+#line 3418 "parse.y"
 {
                  yyval.ttype = empty_parms();
                ;
     break;}
 case 793:
-#line 3424 "parse.y"
+#line 3423 "parse.y"
 { yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[0].ftype.t), 0);
                  check_for_new_type ("inside parameter list", yyvsp[0].ftype); ;
     break;}
 case 794:
-#line 3432 "parse.y"
+#line 3431 "parse.y"
 { yyval.ttype = finish_parmlist (yyval.ttype, 0); ;
     break;}
 case 795:
-#line 3434 "parse.y"
+#line 3433 "parse.y"
 { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ;
     break;}
 case 796:
-#line 3437 "parse.y"
+#line 3436 "parse.y"
 { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ;
     break;}
 case 797:
-#line 3439 "parse.y"
+#line 3438 "parse.y"
 { yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE,
                                                         yyvsp[-1].ftype.t), 1); ;
     break;}
 case 798:
-#line 3442 "parse.y"
+#line 3441 "parse.y"
 { yyval.ttype = finish_parmlist (NULL_TREE, 1); ;
     break;}
 case 799:
-#line 3444 "parse.y"
+#line 3443 "parse.y"
 {
                  /* This helps us recover from really nasty
                     parse errors, for example, a missing right
@@ -7481,7 +7480,7 @@ case 799:
                ;
     break;}
 case 800:
-#line 3454 "parse.y"
+#line 3453 "parse.y"
 {
                  /* This helps us recover from really nasty
                     parse errors, for example, a missing right
@@ -7494,292 +7493,290 @@ case 800:
                ;
     break;}
 case 801:
-#line 3469 "parse.y"
+#line 3468 "parse.y"
 { maybe_snarf_defarg (); ;
     break;}
 case 802:
-#line 3471 "parse.y"
+#line 3470 "parse.y"
 { yyval.ttype = yyvsp[0].ttype; ;
     break;}
 case 805:
-#line 3482 "parse.y"
+#line 3481 "parse.y"
 { check_for_new_type ("in a parameter list", yyvsp[0].ftype);
                  yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); ;
     break;}
 case 806:
-#line 3485 "parse.y"
+#line 3484 "parse.y"
 { check_for_new_type ("in a parameter list", yyvsp[-1].ftype);
                  yyval.ttype = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t); ;
     break;}
 case 807:
-#line 3488 "parse.y"
+#line 3487 "parse.y"
 { check_for_new_type ("in a parameter list", yyvsp[0].ftype);
                  yyval.ttype = chainon (yyval.ttype, yyvsp[0].ftype.t); ;
     break;}
 case 808:
-#line 3491 "parse.y"
+#line 3490 "parse.y"
 { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
     break;}
 case 809:
-#line 3493 "parse.y"
+#line 3492 "parse.y"
 { yyval.ttype = chainon (yyval.ttype, build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype)); ;
     break;}
 case 811:
-#line 3499 "parse.y"
+#line 3498 "parse.y"
 { check_for_new_type ("in a parameter list", yyvsp[-1].ftype);
                  yyval.ttype = build_tree_list (NULL_TREE, yyvsp[-1].ftype.t); ;
     break;}
 case 812:
-#line 3509 "parse.y"
+#line 3508 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ftype.t);
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag;
                  yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); ;
     break;}
 case 813:
-#line 3513 "parse.y"
+#line 3512 "parse.y"
 { yyval.ftype.t = build_tree_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 814:
-#line 3516 "parse.y"
+#line 3515 "parse.y"
 { yyval.ftype.t = build_tree_list (get_decl_list (yyvsp[-1].ftype.t), yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 815:
-#line 3519 "parse.y"
+#line 3518 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ftype.t);
                  yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype);
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
     break;}
 case 816:
-#line 3523 "parse.y"
+#line 3522 "parse.y"
 { tree specs = strip_attrs (yyvsp[0].ftype.t);
                  yyval.ftype.t = build_tree_list (specs, NULL_TREE); 
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
     break;}
 case 817:
-#line 3527 "parse.y"
+#line 3526 "parse.y"
 { tree specs = strip_attrs (yyvsp[-1].ttype);
                  yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); 
                  yyval.ftype.new_type_flag = 0; ;
     break;}
 case 818:
-#line 3534 "parse.y"
+#line 3533 "parse.y"
 { yyval.ftype.t = build_tree_list (NULL_TREE, yyvsp[0].ftype.t);
                  yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag;  ;
     break;}
 case 819:
-#line 3537 "parse.y"
+#line 3536 "parse.y"
 { yyval.ftype.t = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t);
                  yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag;  ;
     break;}
 case 822:
-#line 3548 "parse.y"
+#line 3547 "parse.y"
 { see_typename (); ;
     break;}
 case 823:
-#line 3553 "parse.y"
+#line 3552 "parse.y"
 {
-                 cp_error (ec_type_specifier_omitted_for_parameter);
+                 error ("type specifier omitted for parameter");
                  yyval.ttype = build_tree_list (integer_type_node, NULL_TREE);
                ;
     break;}
 case 824:
-#line 3558 "parse.y"
+#line 3557 "parse.y"
 {
-                 cp_error (ec_type_specifier_omitted_for_parameter);
+                 error ("type specifier omitted for parameter");
                  if (TREE_CODE (yyval.ttype) == SCOPE_REF
                      && (TREE_CODE (TREE_OPERAND (yyval.ttype, 0)) == TEMPLATE_TYPE_PARM
                          || TREE_CODE (TREE_OPERAND (yyval.ttype, 0)) == TEMPLATE_TEMPLATE_PARM))
-                   cp_error
-                     (ec_perhaps_you_want_typename_expr_to_make_it_a_type, 
-                      yyval.ttype);
+                   cp_error ("  perhaps you want `typename %E' to make it a type", yyval.ttype);
                  yyval.ttype = build_tree_list (integer_type_node, yyval.ttype);
                ;
     break;}
 case 825:
-#line 3572 "parse.y"
+#line 3569 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 826:
-#line 3574 "parse.y"
+#line 3571 "parse.y"
 { yyval.ttype = yyvsp[-1].ttype; ;
     break;}
 case 827:
-#line 3576 "parse.y"
+#line 3573 "parse.y"
 { yyval.ttype = build_decl_list (NULL_TREE, NULL_TREE); ;
     break;}
 case 828:
-#line 3581 "parse.y"
+#line 3578 "parse.y"
 { yyval.ttype = build_decl_list (NULL_TREE, groktypename(yyvsp[0].ftype.t)); ;
     break;}
 case 830:
-#line 3587 "parse.y"
+#line 3584 "parse.y"
 {
                  TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype;
                  yyval.ttype = yyvsp[0].ttype;
                ;
     break;}
 case 831:
-#line 3595 "parse.y"
+#line 3592 "parse.y"
 { yyval.ttype = NULL_TREE; ;
     break;}
 case 832:
-#line 3597 "parse.y"
+#line 3594 "parse.y"
 { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 833:
-#line 3599 "parse.y"
+#line 3596 "parse.y"
 { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
     break;}
 case 834:
-#line 3601 "parse.y"
+#line 3598 "parse.y"
 { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
                  yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
                ;
     break;}
 case 835:
-#line 3608 "parse.y"
+#line 3605 "parse.y"
 { got_scope = NULL_TREE; ;
     break;}
 case 836:
-#line 3613 "parse.y"
+#line 3610 "parse.y"
 { yyval.ttype = ansi_opname[MULT_EXPR]; ;
     break;}
 case 837:
-#line 3615 "parse.y"
+#line 3612 "parse.y"
 { yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ;
     break;}
 case 838:
-#line 3617 "parse.y"
+#line 3614 "parse.y"
 { yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ;
     break;}
 case 839:
-#line 3619 "parse.y"
+#line 3616 "parse.y"
 { yyval.ttype = ansi_opname[PLUS_EXPR]; ;
     break;}
 case 840:
-#line 3621 "parse.y"
+#line 3618 "parse.y"
 { yyval.ttype = ansi_opname[MINUS_EXPR]; ;
     break;}
 case 841:
-#line 3623 "parse.y"
+#line 3620 "parse.y"
 { yyval.ttype = ansi_opname[BIT_AND_EXPR]; ;
     break;}
 case 842:
-#line 3625 "parse.y"
+#line 3622 "parse.y"
 { yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ;
     break;}
 case 843:
-#line 3627 "parse.y"
+#line 3624 "parse.y"
 { yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ;
     break;}
 case 844:
-#line 3629 "parse.y"
+#line 3626 "parse.y"
 { yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ;
     break;}
 case 845:
-#line 3631 "parse.y"
+#line 3628 "parse.y"
 { yyval.ttype = ansi_opname[COMPOUND_EXPR]; ;
     break;}
 case 846:
-#line 3633 "parse.y"
+#line 3630 "parse.y"
 { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
     break;}
 case 847:
-#line 3635 "parse.y"
+#line 3632 "parse.y"
 { yyval.ttype = ansi_opname[LT_EXPR]; ;
     break;}
 case 848:
-#line 3637 "parse.y"
+#line 3634 "parse.y"
 { yyval.ttype = ansi_opname[GT_EXPR]; ;
     break;}
 case 849:
-#line 3639 "parse.y"
+#line 3636 "parse.y"
 { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
     break;}
 case 850:
-#line 3641 "parse.y"
+#line 3638 "parse.y"
 { yyval.ttype = ansi_assopname[yyvsp[0].code]; ;
     break;}
 case 851:
-#line 3643 "parse.y"
+#line 3640 "parse.y"
 { yyval.ttype = ansi_opname [MODIFY_EXPR]; ;
     break;}
 case 852:
-#line 3645 "parse.y"
+#line 3642 "parse.y"
 { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
     break;}
 case 853:
-#line 3647 "parse.y"
+#line 3644 "parse.y"
 { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
     break;}
 case 854:
-#line 3649 "parse.y"
+#line 3646 "parse.y"
 { yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ;
     break;}
 case 855:
-#line 3651 "parse.y"
+#line 3648 "parse.y"
 { yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ;
     break;}
 case 856:
-#line 3653 "parse.y"
+#line 3650 "parse.y"
 { yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ;
     break;}
 case 857:
-#line 3655 "parse.y"
+#line 3652 "parse.y"
 { yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ;
     break;}
 case 858:
-#line 3657 "parse.y"
+#line 3654 "parse.y"
 { yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ;
     break;}
 case 859:
-#line 3659 "parse.y"
+#line 3656 "parse.y"
 { yyval.ttype = ansi_opname[COND_EXPR]; ;
     break;}
 case 860:
-#line 3661 "parse.y"
+#line 3658 "parse.y"
 { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
     break;}
 case 861:
-#line 3663 "parse.y"
+#line 3660 "parse.y"
 { yyval.ttype = ansi_opname[COMPONENT_REF]; ;
     break;}
 case 862:
-#line 3665 "parse.y"
+#line 3662 "parse.y"
 { yyval.ttype = ansi_opname[MEMBER_REF]; ;
     break;}
 case 863:
-#line 3667 "parse.y"
+#line 3664 "parse.y"
 { yyval.ttype = ansi_opname[CALL_EXPR]; ;
     break;}
 case 864:
-#line 3669 "parse.y"
+#line 3666 "parse.y"
 { yyval.ttype = ansi_opname[ARRAY_REF]; ;
     break;}
 case 865:
-#line 3671 "parse.y"
+#line 3668 "parse.y"
 { yyval.ttype = ansi_opname[NEW_EXPR]; ;
     break;}
 case 866:
-#line 3673 "parse.y"
+#line 3670 "parse.y"
 { yyval.ttype = ansi_opname[DELETE_EXPR]; ;
     break;}
 case 867:
-#line 3675 "parse.y"
+#line 3672 "parse.y"
 { yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ;
     break;}
 case 868:
-#line 3677 "parse.y"
+#line 3674 "parse.y"
 { yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ;
     break;}
 case 869:
-#line 3680 "parse.y"
+#line 3677 "parse.y"
 { yyval.ttype = grokoptypename (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
     break;}
 case 870:
-#line 3682 "parse.y"
+#line 3679 "parse.y"
 { yyval.ttype = ansi_opname[ERROR_MARK]; ;
     break;}
 }
@@ -7980,7 +7977,7 @@ yyerrhandle:
   yystate = yyn;
   goto yynewstate;
 }
-#line 3685 "parse.y"
+#line 3682 "parse.y"
 
 
 #ifdef SPEW_DEBUG
index 31fb8856942a3cfa49fdfd37f448b1b5002ffab2..5bc8cb0bd93f4dec89d0a5d5cb9ea600e0397e21 100644 (file)
@@ -489,8 +489,7 @@ extern_lang_string:
                { push_lang_context ($1); }
        | extern_lang_string EXTERN_LANG_STRING
                { if (current_lang_name != $2)
-                   cp_error
-                     (ec_use_of_linkage_spec_is_different_from_previous_spec, $2, current_lang_name); 
+                   cp_error ("use of linkage spec `%D' is different from previous spec `%D'", $2, current_lang_name);
                  pop_lang_context (); push_lang_context ($2); }
        ;
 
@@ -553,7 +552,7 @@ template_parm:
                      && TREE_CODE ($3) != TEMPLATE_TEMPLATE_PARM
                      && TREE_CODE ($3) != TYPE_DECL)
                    {
-                     cp_error (ec_invalid_default_template_argument);
+                     error ("invalid default template argument");
                      $3 = error_mark_node;
                    }
                  $$ = build_tree_list ($3, $1);
@@ -602,7 +601,7 @@ datadef:
        | typed_declspecs initdecls ';'
                 { note_list_got_semicolon ($1.t); }
         | declmods ';'
-               { cp_pedwarn (ec_empty_declaration); }
+               { pedwarn ("empty declaration"); }
        | explicit_instantiation ';'
        | typed_declspecs ';'
                {
@@ -758,7 +757,7 @@ base_init:
          ':' .set_base_init member_init_list
                {
                  if ($3 == 0)
-                   cp_error (ec_no_base_initializers_given_following);
+                   error ("no base initializers given following ':'");
                  setup_vtbl_ptr ();
                  /* Always keep the BLOCK node associated with the outermost
                     pair of curley braces of a function.  These are needed
@@ -781,9 +780,9 @@ base_init:
                      expand_start_bindings (0);
                    }
                  else if (current_class_type == NULL_TREE)
-                   cp_error (ec_base_initializers_not_allowed_for_nonmember_functions);
+                   error ("base initializers not allowed for non-member functions");
                  else if (! DECL_CONSTRUCTOR_P (current_function_decl))
-                   cp_error (ec_only_constructors_take_base_initializers);
+                   error ("only constructors take base initializers");
                }
        ;
 
@@ -800,13 +799,13 @@ member_init:
          '(' nonnull_exprlist ')'
                {
                  if (current_class_name)
-                   cp_pedwarn (ec_anachronistic_old_style_base_class_initializer);
+                   pedwarn ("anachronistic old style base class initializer");
                  expand_member_init (current_class_ref, NULL_TREE, $2);
                }
        | LEFT_RIGHT
                {
                  if (current_class_name)
-                   cp_pedwarn (ec_anachronistic_old_style_base_class_initializer);
+                   pedwarn ("anachronistic old style base class initializer");
                  expand_member_init (current_class_ref, NULL_TREE, void_type_node);
                }
        | notype_identifier '(' nonnull_exprlist ')'
@@ -917,7 +916,7 @@ template_close_bracket:
        | RSHIFT 
                {
                  /* Handle `Class<Class<Type>>' without space in the `>>' */
-                 cp_pedwarn (ec_should_be_in_template_class_name);
+                 pedwarn ("`>>' should be `> >' in template class name");
                  yyungetc ('>', 1);
                }
        ;
@@ -964,7 +963,7 @@ expr:
 
 paren_expr_or_null:
        LEFT_RIGHT
-               { cp_error (ec_forbids_an_empty_condition_for_s,
+               { error ("ANSI C++ forbids an empty condition for `%s'",
                         cond_stmt_keyword);
                  $$ = integer_zero_node; }
        | '(' expr ')'
@@ -973,7 +972,7 @@ paren_expr_or_null:
 
 paren_cond_or_null:
        LEFT_RIGHT
-               { cp_error (ec_forbids_an_empty_condition_for_s,
+               { error ("ANSI C++ forbids an empty condition for `%s'",
                         cond_stmt_keyword);
                  $$ = integer_zero_node; }
        | '(' condition ')'
@@ -996,9 +995,9 @@ condition:
                    if (TREE_CODE (d) == TYPE_DECL) {
                      tree s = TREE_TYPE (d);
                      if (TREE_CODE (s) == RECORD_TYPE)
-                       cp_error (ec_definition_of_class_in_condition, s);
+                       cp_error ("definition of class `%T' in condition", s);
                      else if (TREE_CODE (s) == ENUMERAL_TYPE)
-                       cp_error (ec_definition_of_enum_in_condition, s);
+                       cp_error ("definition of enum `%T' in condition", s);
                    }
                  }
                  current_declspecs = $1.t;
@@ -1012,7 +1011,7 @@ condition:
                  resume_momentary ($<itype>5);
                  $$ = $<ttype>6; 
                  if (TREE_CODE (TREE_TYPE ($$)) == ARRAY_TYPE)
-                   cp_error (ec_definition_of_array_in_condition, $$); 
+                   cp_error ("definition of array `%#D' in condition", $$); 
                }
        | expr
        ;
@@ -1070,7 +1069,7 @@ unary_expr:
        /* Refer to the address of a label as a pointer.  */
        | ANDAND identifier
                { if (pedantic)
-                   cp_pedwarn (ec_forbids);
+                   pedwarn ("ANSI C++ forbids `&&'");
                  $$ = finish_label_address_expr ($2); }
        | SIZEOF unary_expr  %prec UNARY
                { $$ = expr_sizeof ($2); }
@@ -1155,7 +1154,7 @@ new_placement:
          '(' .begin_new_placement nonnull_exprlist ')'
                 { $$ = finish_new_placement ($3, $2); }
        | '{' .begin_new_placement nonnull_exprlist '}'
-                { cp_pedwarn (ec_old_style_placement_syntax_use_instead);
+                { cp_pedwarn ("old style placement syntax, use () instead");
                  $$ = finish_new_placement ($3, $2); }
        ;
 
@@ -1166,7 +1165,7 @@ new_initializer:
                { $$ = NULL_TREE; }
        | '(' typespec ')'
                {
-                 cp_error (ec_is_not_a_valid_expression, $2.t);
+                 cp_error ("`%T' is not a valid expression", $2.t);
                  $$ = error_mark_node;
                }
        /* GNU extension so people can use initializer lists.  Note that
@@ -1175,7 +1174,7 @@ new_initializer:
        | '=' init
                {
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_initialization_of_new_expression_with);
+                   pedwarn ("ANSI C++ forbids initialization of new expression with `='");
                  if (TREE_CODE ($2) != TREE_LIST
                      && TREE_CODE ($2) != CONSTRUCTOR)
                    $$ = build_expr_list (NULL_TREE, $2);
@@ -1205,7 +1204,7 @@ cast_expr:
                  tree init = build_nt (CONSTRUCTOR, NULL_TREE,
                                        nreverse ($3)); 
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_constructorexpressions);
+                   pedwarn ("ANSI C++ forbids constructor-expressions");
                  /* Indicate that this was a GNU C constructor expression.  */
                  TREE_HAS_CONSTRUCTOR (init) = 1;
 
@@ -1381,11 +1380,11 @@ primary:
                { tree scope = current_scope ();
                  if (!scope || TREE_CODE (scope) != FUNCTION_DECL)
                    {
-                     cp_error (ec_bracedgroup_within_expression_allowed_only_inside_a_function);
+                     error ("braced-group within expression allowed only inside a function");
                      YYERROR;
                    }
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_bracedgroups_within_expressions);  
+                   pedwarn ("ANSI C++ forbids braced-groups within expressions");  
                  $<ttype>$ = begin_stmt_expr (); 
                }
          compstmt ')'
@@ -1424,7 +1423,7 @@ primary:
 #if 0
                  if ($3 == NULL_TREE)
                    {
-                     cp_error (ec_cannot_cast_null_list_to_type_s,
+                     error ("cannot cast null list to type `%s'",
                             IDENTIFIER_POINTER (TYPE_NAME (id)));
                      $$ = error_mark_node;
                      break;
@@ -1445,7 +1444,7 @@ primary:
                      /* should not be able to get here (mrs) */
                      else if (id == ridpointers[(int) RID_FRIEND])
                        {
-                         cp_error (ec_cannot_cast_expression_to_friend_type);
+                         error ("cannot cast expression to `friend' type");
                          $$ = error_mark_node;
                          break;
                        }
@@ -1539,13 +1538,13 @@ primary_no_id:
        | '('
                { if (current_function_decl == 0)
                    {
-                     cp_error (ec_bracedgroup_within_expression_allowed_only_inside_a_function);
+                     error ("braced-group within expression allowed only inside a function");
                      YYERROR;
                    }
                  $<ttype>$ = expand_start_stmt_expr (); }
          compstmt ')'
                { if (pedantic)
-                   cp_pedwarn (ec_forbids_bracedgroups_within_expressions);
+                   pedwarn ("ANSI C++ forbids braced-groups within expressions");
                  $$ = expand_end_stmt_expr ($<ttype>2); }
        | primary_no_id '(' nonnull_exprlist ')'
                { $$ = build_x_function_call ($$, $3, current_class_ref); }
@@ -1638,7 +1637,7 @@ decl:
                  note_list_got_semicolon ($1.t);
                }
        | declmods ';'
-               { cp_warning (ec_empty_declaration); }
+               { warning ("empty declaration"); }
        | extension decl
                { pedantic = $<itype>1; }
        ;
@@ -1715,14 +1714,14 @@ typed_declspecs1:
 reserved_declspecs:
          SCSPEC
                { if (extra_warnings)
-                   cp_warning (ec_s_is_not_at_beginning_of_declaration,
+                   warning ("`%s' is not at beginning of declaration",
                             IDENTIFIER_POINTER ($$));
                  $$ = build_decl_list (NULL_TREE, $$); }
        | reserved_declspecs typespecqual_reserved
                { $$ = decl_tree_cons (NULL_TREE, $2.t, $$); }
        | reserved_declspecs SCSPEC
                { if (extra_warnings)
-                   cp_warning (ec_s_is_not_at_beginning_of_declaration,
+                   warning ("`%s' is not at beginning of declaration",
                             IDENTIFIER_POINTER ($2));
                  $$ = decl_tree_cons (NULL_TREE, $2, $$); }
        | reserved_declspecs attributes
@@ -1746,7 +1745,7 @@ declmods:
                  TREE_STATIC ($$) = 1; }
        | declmods SCSPEC
                { if (extra_warnings && TREE_STATIC ($$))
-                   cp_warning (ec_s_is_not_at_beginning_of_declaration,
+                   warning ("`%s' is not at beginning of declaration",
                             IDENTIFIER_POINTER ($2));
                  $$ = decl_tree_cons (NULL_TREE, $2, $$);
                  TREE_STATIC ($$) = TREE_STATIC ($1); }
@@ -1811,7 +1810,7 @@ typespec:
                    }
                  else
                    {
-                     cp_error (ec_sigof_applied_to_nonaggregate_expression);
+                     error ("`sigof' applied to non-aggregate expression");
                      $$.t = error_mark_node;
                    }
                }
@@ -1826,7 +1825,7 @@ typespec:
                    }
                  else
                    {
-                     cp_error (ec_sigof_applied_to_nonaggregate_type);
+                     error("`sigof' applied to non-aggregate type");
                      $$.t = error_mark_node;
                    }
                }
@@ -2102,7 +2101,7 @@ structsp:
                { $$.t = $2;
                  $$.new_type_flag = 0; 
                  if (!processing_template_decl)
-                   cp_pedwarn (ec_using_typename_outside_of_template); }
+                   cp_pedwarn ("using `typename' outside of template"); }
        /* C++ extensions, merged with C to avoid shift/reduce conflicts */
        | class_head left_curly 
           opt.component_decl_list '}' maybe_attribute
@@ -2126,7 +2125,7 @@ structsp:
                  $$.new_type_flag = 0;
                  if (TYPE_BINFO ($1) == NULL_TREE)
                    {
-                     cp_error (ec_is_not_a_class_type, $1);
+                     cp_error ("%T is not a class type", $1);
                      $$.t = error_mark_node;
                    } 
                  else
@@ -2135,7 +2134,7 @@ structsp:
                      /* struct B: public A; is not accepted by the WP grammar.  */
                      if (TYPE_BINFO_BASETYPES ($$.t) && !TYPE_SIZE ($$.t)
                          && ! TYPE_BEING_DEFINED ($$.t))
-                       cp_error (ec_base_clause_without_member_specification_for,
+                       cp_error ("base clause without member specification for `%#T'",
                                  $$.t);
                    }
                }
@@ -2150,19 +2149,19 @@ maybecomma_warn:
          /* empty */
        | ','
                { if (pedantic && !in_system_header)
-                   cp_pedwarn (ec_comma_at_end_of_enumerator_list); }
+                   pedwarn ("comma at end of enumerator list"); }
        ;
 
 aggr:
          AGGR
        | aggr SCSPEC
-               { cp_error (ec_storage_class_specifier_s_not_allowed_after_struct_or_class, IDENTIFIER_POINTER ($2)); }
+               { error ("storage class specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER ($2)); }
        | aggr TYPESPEC
-               { cp_error (ec_type_specifier_s_not_allowed_after_struct_or_class, IDENTIFIER_POINTER ($2)); }
+               { error ("type specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER ($2)); }
        | aggr CV_QUALIFIER
-               { cp_error (ec_type_qualifier_s_not_allowed_after_struct_or_class, IDENTIFIER_POINTER ($2)); }
+               { error ("type qualifier `%s' not allowed after struct or class", IDENTIFIER_POINTER ($2)); }
        | aggr AGGR
-               { cp_error (ec_no_body_nor_separates_two_class_struct_or_union_declarations); }
+               { error ("no body nor ';' separates two class, struct or union declarations"); }
        | aggr attributes
                { $$ = build_decl_list ($2, $1); }
        ;
@@ -2223,10 +2222,10 @@ named_class_head:
                  $$ = TREE_TYPE ($1);
                  if (TREE_INT_CST_LOW (current_aggr) == union_type 
                      && TREE_CODE ($$) != UNION_TYPE)
-                   cp_pedwarn (ec_union_tag_used_in_declaring, $$);
+                   cp_pedwarn ("`union' tag used in declaring `%#T'", $$);
                  else if (TREE_CODE ($$) == UNION_TYPE
                           && TREE_INT_CST_LOW (current_aggr) != union_type)
-                   cp_pedwarn (ec_nonunion_tag_used_in_declaring, $$);
+                   cp_pedwarn ("non-`union' tag used in declaring `%#T'", $$);
                  if ($2)
                    {
                      maybe_process_partial_specialization ($$);
@@ -2287,13 +2286,13 @@ base_class.1:
                        }
                      else
                        {
-                         cp_error (ec_sigof_applied_to_nonaggregate_expression);
+                         error ("`sigof' applied to non-aggregate expression");
                          $$ = error_mark_node;
                        }
                    }
                  else
                    {
-                     cp_error (ec_sigof_in_struct_or_class_declaration);
+                     error ("`sigof' in struct or class declaration");
                      $$ = error_mark_node;
                    }
                }
@@ -2308,13 +2307,13 @@ base_class.1:
                        }
                      else
                        {
-                         cp_error (ec_sigof_applied_to_nonaggregate_expression);
+                         error ("`sigof' applied to non-aggregate expression");
                          $$ = error_mark_node;
                        }
                    }
                  else
                    {
-                     cp_error (ec_sigof_in_struct_or_class_declaration);
+                     error ("`sigof' in struct or class declaration");
                      $$ = error_mark_node;
                    }
                }
@@ -2324,12 +2323,12 @@ base_class_access_list:
          VISSPEC see_typename
        | SCSPEC see_typename
                { if ($1 != ridpointers[(int)RID_VIRTUAL])
-                   cp_error (ec_access, $1);
+                   cp_error ("`%D' access", $1);
                  $$ = access_default_virtual_node; }
        | base_class_access_list VISSPEC see_typename
                {
                  if ($1 != access_default_virtual_node)
-                   cp_error (ec_multiple_access_specifiers);
+                   error ("multiple access specifiers");
                  else if ($2 == access_public_node)
                    $$ = access_public_virtual_node;
                  else if ($2 == access_protected_node)
@@ -2339,7 +2338,7 @@ base_class_access_list:
                }
        | base_class_access_list SCSPEC see_typename
                { if ($2 != ridpointers[(int)RID_VIRTUAL])
-                   cp_error (ec_access, $2);
+                   cp_error ("`%D' access", $2);
                  else if ($$ == access_public_node)
                    $$ = access_public_virtual_node;
                  else if ($$ == access_protected_node)
@@ -2347,7 +2346,7 @@ base_class_access_list:
                  else if ($$ == access_private_node)
                    $$ = access_private_virtual_node;
                  else
-                   cp_error (ec_multiple_virtual_specifiers);
+                   error ("multiple `virtual' specifiers");
                }
        ;
 
@@ -2380,7 +2379,7 @@ opt.component_decl_list:
 
                  if (current_aggr == signature_type_node)
                    {
-                     cp_error (ec_access_specifier_not_allowed_in_signature);
+                     error ("access specifier not allowed in signature");
                      visspec = access_public_node;
                    }
                  $$ = chainon ($$, build_tree_list (visspec, $4));
@@ -2388,7 +2387,7 @@ opt.component_decl_list:
        | opt.component_decl_list VISSPEC ':'
                {
                  if (current_aggr == signature_type_node)
-                   cp_error (ec_access_specifier_not_allowed_in_signature);
+                   error ("access specifier not allowed in signature");
                }
        ;
 
@@ -2417,7 +2416,7 @@ component_decl:
          component_decl_1 ';'
                { }
        | component_decl_1 '}'
-               { cp_error (ec_missing_before_right_brace);
+               { error ("missing ';' before right brace");
                  yyungetc ('}', 0); }
        /* C++: handle constructors, destructors and inline functions */
        /* note that INLINE is like a TYPESPEC */
@@ -2615,7 +2614,7 @@ new_type_id:
              '[' expr ']'
                {
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_array_dimensions_with_parenthesized_type_in_new);
+                   pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new");
                  $$.t = build_parse_node (ARRAY_REF, TREE_VALUE ($3.t), $6);
                  $$.t = build_decl_list (TREE_PURPOSE ($3.t), $$.t);
                  $$.new_type_flag = $3.new_type_flag;
@@ -2871,7 +2870,7 @@ nested_name_specifier_1:
        | IDENTIFIER SCOPE
                {
                 failed_scope:
-                 cp_error (ec_is_not_an_aggregate_typedef
+                 cp_error ("`%D' is not an aggregate typedef"
                            lastiddecl ? lastiddecl : $$);
                  $$ = error_mark_node;
                }
@@ -2891,7 +2890,7 @@ typename_sub0:
                  if (TREE_CODE_CLASS (TREE_CODE ($1)) == 't')
                    $$ = make_typename_type ($1, $2);
                  else if (TREE_CODE ($2) == IDENTIFIER_NODE)
-                   cp_error (ec_is_not_a_class_or_namespace, $2);
+                   cp_error ("`%T' is not a class or namespace", $2);
                  else
                    {
                      $$ = $2;
@@ -2911,14 +2910,14 @@ typename_sub1:
          typename_sub2
                {
                  if (TREE_CODE ($1) == IDENTIFIER_NODE)
-                   cp_error (ec_is_not_a_class_or_namespace, $1);
+                   cp_error ("`%T' is not a class or namespace", $1);
                }
        | typename_sub1 typename_sub2
                {
                  if (TREE_CODE_CLASS (TREE_CODE ($1)) == 't')
                    $$ = make_typename_type ($1, $2);
                  else if (TREE_CODE ($2) == IDENTIFIER_NODE)
-                   cp_error (ec_is_not_a_class_or_namespace, $2);
+                   cp_error ("`%T' is not a class or namespace", $2);
                  else
                    {
                      $$ = $2;
@@ -2943,7 +2942,7 @@ typename_sub2:
                  got_scope = $$ = complete_type (IDENTIFIER_TYPE_VALUE ($1));
 
                  if ($$ == error_mark_node)
-                   cp_error (ec_is_not_a_class_or_namespace, $1);
+                   cp_error ("`%T' is not a class or namespace", $1);
                }
        | SELFNAME SCOPE
                {
@@ -3101,7 +3100,7 @@ maybe_label_decls:
          /* empty */
        | label_decls
                { if (pedantic)
-                   cp_pedwarn (ec_forbids_label_declarations); }
+                   pedwarn ("ANSI C++ forbids label declarations"); }
        ;
 
 label_decls:
@@ -3247,7 +3246,7 @@ simple_stmt:
        | GOTO '*' expr ';'
                 { 
                  if (pedantic)
-                   cp_pedwarn (ec_forbids_computed_gotos);
+                   pedwarn ("ANSI C++ forbids computed gotos");
                  finish_goto_stmt ($3);
                }
        | GOTO identifier ';'
@@ -3255,7 +3254,7 @@ simple_stmt:
        | label_colon stmt
                { finish_stmt (); }
        | label_colon '}'
-               { cp_error (ec_label_must_be_followed_by_statement);
+               { error ("label must be followed by statement");
                  yyungetc ('}', 0);
                  finish_stmt (); }
        | ';'
@@ -3360,7 +3359,7 @@ for.init.statement:
        | decl
        | '{' compstmtend
                { if (pedantic)
-                   cp_pedwarn (ec_forbids_compound_statements_inside_for_initializations);
+                   pedwarn ("ANSI C++ forbids compound statements inside for initializations");
                }
        ;
 
@@ -3551,18 +3550,16 @@ see_typename:
 bad_parm:
          /* empty */ %prec EMPTY
                {
-                 cp_error (ec_type_specifier_omitted_for_parameter);
+                 error ("type specifier omitted for parameter");
                  $$ = build_tree_list (integer_type_node, NULL_TREE);
                }
        | notype_declarator
                {
-                 cp_error (ec_type_specifier_omitted_for_parameter);
+                 error ("type specifier omitted for parameter");
                  if (TREE_CODE ($$) == SCOPE_REF
                      && (TREE_CODE (TREE_OPERAND ($$, 0)) == TEMPLATE_TYPE_PARM
                          || TREE_CODE (TREE_OPERAND ($$, 0)) == TEMPLATE_TEMPLATE_PARM))
-                   cp_error
-                     (ec_perhaps_you_want_typename_expr_to_make_it_a_type, 
-                      $$);
+                   cp_error ("  perhaps you want `typename %E' to make it a type", $$);
                  $$ = build_tree_list (integer_type_node, $$);
                }
        ;
index ca88d1cb1c3b4344f4a358abd9ce8521d4bfa25b..04c9fd65fdabfef2d543f57c3487f8b678a01f14 100644 (file)
@@ -228,7 +228,7 @@ finish_member_template_decl (template_parameters, decl)
        return decl;
     } 
   else
-    cp_error (ec_invalid_member_template_declaration, decl);
+    cp_error ("invalid member template declaration `%D'", decl);
        
 
   return error_mark_node;
@@ -594,7 +594,7 @@ check_specialization_scope ()
      shall be declared in the namespace of which the class template
      is a member.  */
   if (scope && TREE_CODE (scope) != NAMESPACE_DECL)
-    cp_error (ec_explicit_specialization_in_nonnamespace_scope,
+    cp_error ("explicit specialization in non-namespace scope `%D'",
              scope);
   /* [temp.expl.spec] 
 
@@ -605,7 +605,7 @@ check_specialization_scope ()
      explicitly specialize a class member template if its enclosing
      class templates are not explicitly specialized as well.  */
   if (current_template_parms) 
-    cp_error (ec_enclosing_class_templates_are_not_explicit_specialized);
+    cp_error ("enclosing class templates are not explicit specialized");
 }
 
 /* We've just seen template <>. */
@@ -680,7 +680,7 @@ maybe_process_partial_specialization (type)
            push_template_decl (TYPE_MAIN_DECL (type));
        }
       else if (CLASSTYPE_TEMPLATE_INSTANTIATION (type))
-       cp_error (ec_specialization_of_type_after_instantiation, type);
+       cp_error ("specialization of `%T' after instantiation", type);
     }
 }
 
@@ -797,7 +797,7 @@ register_specialization (spec, tmpl, args)
                if (TREE_USED (fn) 
                    || DECL_EXPLICIT_INSTANTIATION (fn))
                  {
-                   cp_error (ec_specialization_of_decl_after_instantiation,
+                   cp_error ("specialization of %D after instantiation",
                              fn);
                    return spec;
                  }
@@ -875,7 +875,7 @@ print_candidates (fns)
 
   for (fn = fns; fn != NULL_TREE; fn = TREE_CHAIN (fn))
     {
-      cp_error_at (ec_decl, str, TREE_VALUE (fn));
+      cp_error_at ("%s %+#D", str, TREE_VALUE (fn));
       str = "               ";
     }
 }
@@ -997,7 +997,7 @@ determine_specialization (template_id, decl, targs_out,
     no_match:
       if (complain)
        {
-         cp_error_at (ec_templateid_for_does_not_match_any_template_declaration,
+         cp_error_at ("template-id `%D' for `%+D' does not match any template declaration",
                       template_id, decl);
          return error_mark_node;
        }
@@ -1008,7 +1008,7 @@ determine_specialization (template_id, decl, targs_out,
     ambiguous:
       if (complain)
        {
-         cp_error_at (ec_ambiguous_template_specialization_for,
+         cp_error_at ("ambiguous template specialization `%D' for `%+D'",
                       template_id, decl);
          print_candidates (templates);
          return error_mark_node;
@@ -1095,7 +1095,7 @@ check_explicit_specialization (declarator, decl, template_count, flags)
                   lists.  There can be at most one parameter list for
                   every qualifying class, plus one for the function
                   itself.  */
-               cp_error (ec_too_many_template_parameter_lists_in_declaration_of, decl);
+               cp_error ("too many template parameter lists in declaration of `%D'", decl);
 
              SET_DECL_TEMPLATE_SPECIALIZATION (decl);
              if (ctype)
@@ -1127,17 +1127,17 @@ check_explicit_specialization (declarator, decl, template_count, flags)
                 void S<int>::T<char>::f();
 
                 But, we're missing another template <>.  */
-             cp_error (ec_too_few_template_parameter_lists_in_declaration_of, decl);
+             cp_error("too few template parameter lists in declaration of `%D'", decl);
              return decl;
            } 
        }
       else if (processing_explicit_instantiation)
        {
          if (template_header_count)
-           cp_error (ec_template_parameter_list_used_in_explicit_instantiation);
+           cp_error ("template parameter list used in explicit instantiation");
          
          if (have_def)
-           cp_error (ec_definition_provided_for_explicit_instantiation);
+           cp_error ("definition provided for explicit instantiation");
 
          explicit_instantiation = 1;
        }
@@ -1163,12 +1163,13 @@ check_explicit_specialization (declarator, decl, template_count, flags)
             that's bogus.  */
          if (template_header_count)
            {
-             cp_error (ec_template_parameters_specified_in_specialization);
+             cp_error ("template parameters specified in specialization");
              return decl;
            }
 
          if (pedantic)
-           cp_pedwarn (ec_explicit_specialization_not_preceded_by_template);
+           cp_pedwarn
+             ("explicit specialization not preceded by `template <>'");
          specialization = 1;
          SET_DECL_TEMPLATE_SPECIALIZATION (decl);
        }
@@ -1185,7 +1186,7 @@ check_explicit_specialization (declarator, decl, template_count, flags)
              /* This case handles bogus declarations like template <>
                 template <class T> void f<int>(); */
 
-             cp_error (ec_templateid_in_declaration_of_primary_template,
+             cp_error ("template-id `%D' in declaration of primary template",
                        declarator);
              return decl;
            }
@@ -1198,7 +1199,8 @@ check_explicit_specialization (declarator, decl, template_count, flags)
       for (; t; t = TREE_CHAIN (t))
        if (TREE_PURPOSE (t))
          {
-           cp_pedwarn (ec_default_argument_specified_in_explicit_specialization);
+           cp_pedwarn
+             ("default argument specified in explicit specialization");
            break;
          }
     }
@@ -1287,7 +1289,7 @@ check_explicit_specialization (declarator, decl, template_count, flags)
                     program is ill-formed.  
 
                     Similar language is found in [temp.explicit].  */
-                 cp_error (ec_specialization_of_implicitlydeclared_special_member_function);
+                 cp_error ("specialization of implicitly-declared special member function");
 
                  return decl;
                }
@@ -1299,7 +1301,7 @@ check_explicit_specialization (declarator, decl, template_count, flags)
          
          if (fns == NULL_TREE) 
            {
-             cp_error (ec_no_member_function_s_declared_in,
+             cp_error ("no member function `%s' declared in `%T'",
                        IDENTIFIER_POINTER (name),
                        ctype);
              return decl;
@@ -1423,9 +1425,7 @@ maybe_check_template_type (type)
        ; 
       else if (template_header_count > context_depth + 1)
        /* There are two many template parameter lists.  */
-       cp_error
-         (ec_too_many_template_parameter_lists_in_declaration_of_type,
-          type); 
+       cp_error ("too many template parameter lists in declaration of `%T'", type); 
     }
 }
 
@@ -1610,16 +1610,16 @@ process_template_parm (list, next)
          && TREE_CODE (TREE_TYPE (parm)) != TEMPLATE_TYPE_PARM
          && TREE_CODE (TREE_TYPE (parm)) != TYPENAME_TYPE)
        {
-         cp_error (ec_is_not_a_valid_type_for_a_template_constant_parameter,
+         cp_error ("`%#T' is not a valid type for a template constant parameter",
                    TREE_TYPE (parm));
          if (DECL_NAME (parm) == NULL_TREE)
-           cp_error (ec_a_template_type_parameter_must_begin_with_class_or_typename);
+           error ("  a template type parameter must begin with `class' or `typename'");
          TREE_TYPE (parm) = void_type_node;
        }
       else if (pedantic
               && (TREE_CODE (TREE_TYPE (parm)) == REAL_TYPE
                   || TREE_CODE (TREE_TYPE (parm)) == COMPLEX_TYPE))
-       cp_pedwarn (ec_is_not_a_valid_type_for_a_template_constant_parameter,
+       cp_pedwarn ("`%T' is not a valid type for a template constant parameter",
                    TREE_TYPE (parm));
       if (TREE_PERMANENT (parm) == 0)
         {
@@ -1872,7 +1872,7 @@ process_partial_specialization (decl)
        {
          if (!issued_default_arg_message)
            {
-             cp_error (ec_default_argument_in_partial_specialization
+             cp_error ("default argument in partial specialization `%T'"
                        type);
              issued_default_arg_message = 1;
            }
@@ -1930,11 +1930,11 @@ process_partial_specialization (decl)
            specialization.  */
        if (!did_error_intro)
          {
-           cp_error (ec_template_parameters_not_used_in_partial_specialization);
+           cp_error ("template parameters not used in partial specialization:");
            did_error_intro = 1;
          }
 
-       cp_error (ec_template_parm,
+       cp_error ("        `%D'", 
                  TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
       }
 
@@ -1945,7 +1945,7 @@ process_partial_specialization (decl)
   if (comp_template_args (inner_args, 
                          innermost_args (CLASSTYPE_TI_ARGS (TREE_TYPE
                                                             (maintmpl)))))
-    cp_error (ec_partial_specialization_does_not_specialize_any_template_arguments, type);
+    cp_error ("partial specialization `%T' does not specialize any template arguments", type);
 
   /* [temp.class.spec]
 
@@ -1970,7 +1970,7 @@ process_partial_specialization (decl)
          && TREE_CODE (arg) != TEMPLATE_PARM_INDEX)
        {
          if (tpd.arg_uses_template_parms[i])
-           cp_error (ec_template_argument_involves_template_parameters, arg);
+           cp_error ("template argument `%E' involves template parameter(s)", arg);
          else 
            {
              /* Look at the corresponding template parameter,
@@ -2010,7 +2010,7 @@ process_partial_specialization (decl)
                    if (tpd2.parms[j] != 0
                        && tpd.arg_uses_template_parms [j])
                      {
-                       cp_error (ec_type_of_template_argument_depends_on_template_paramters
+                       cp_error ("type `%T' of template argument `%E' depends on template paramter(s)"
                                  type,
                                  arg);
                        break;
@@ -2090,12 +2090,12 @@ push_template_decl_real (decl, is_friend)
   if (primary)
     {
       if (current_lang_name == lang_name_c)
-       cp_error (ec_template_with_linkage);
+       cp_error ("template with C linkage");
       if (TREE_CODE (decl) == TYPE_DECL && ANON_AGGRNAME_P (DECL_NAME (decl)))
-       cp_error (ec_template_class_without_a_name);
+       cp_error ("template class without a name");
       if (TREE_CODE (decl) == TYPE_DECL 
          && TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
-       cp_error (ec_template_declaration_of_type, TREE_TYPE (decl));
+       cp_error ("template declaration of `%#T'", TREE_TYPE (decl));
     }
 
   /* Partial specialization.  */
@@ -2136,7 +2136,7 @@ push_template_decl_real (decl, is_friend)
       tree a;
 
       if (CLASSTYPE_TEMPLATE_INSTANTIATION (ctx))
-       cp_error (ec_must_specialize_before_defining_member,
+       cp_error ("must specialize `%#T' before defining member `%#D'",
                  ctx, decl);
       if (TREE_CODE (decl) == TYPE_DECL)
        {
@@ -2147,13 +2147,13 @@ push_template_decl_real (decl, is_friend)
            tmpl = TYPE_TI_TEMPLATE (TREE_TYPE (decl));
          else
            {
-             cp_error (ec_does_not_declare_a_template_type, decl);
+             cp_error ("`%D' does not declare a template type", decl);
              return decl;
            }
        }
       else if (! DECL_TEMPLATE_INFO (decl))
        {
-         cp_error (ec_template_definition_of_nontemplate, decl);
+         cp_error ("template definition of non-template `%#D'", decl);
          return decl;
        }
       else
@@ -2191,9 +2191,9 @@ push_template_decl_real (decl, is_friend)
          t = DECL_INNERMOST_TEMPLATE_PARMS (tmpl);
          if (TREE_VEC_LENGTH (t) != TREE_VEC_LENGTH (a))
            {
-             cp_error (ec_got_d_template_parameters_for,
+             cp_error ("got %d template parameters for `%#D'",
                        TREE_VEC_LENGTH (a), decl);
-             cp_error (ec_but_d_required, TREE_VEC_LENGTH (t));
+             cp_error ("  but %d required", TREE_VEC_LENGTH (t));
            }
          if (TMPL_ARGS_DEPTH (args) > 1)
            /* Get the template parameters for the enclosing template
@@ -2224,9 +2224,9 @@ push_template_decl_real (decl, is_friend)
       if (t != NULL_TREE 
          && TREE_VEC_LENGTH (t) != TREE_VEC_LENGTH (a))
        {
-         cp_error (ec_got_d_template_parameters_for,
+         cp_error ("got %d template parameters for `%#D'",
                    TREE_VEC_LENGTH (a), decl);
-         cp_error (ec_but_has_d, ctx, TREE_VEC_LENGTH (t));
+         cp_error ("  but `%#T' has %d", ctx, TREE_VEC_LENGTH (t));
        }
     }
 
@@ -2254,7 +2254,7 @@ push_template_decl_real (decl, is_friend)
        DECL_NAME (decl) = classtype_mangled_name (TREE_TYPE (decl));
     }
   else if (! DECL_LANG_SPECIFIC (decl))
-    cp_error (ec_template_declaration_of, decl);
+    cp_error ("template declaration of `%#D'", decl);
   else
     DECL_TEMPLATE_INFO (decl) = info;
 
@@ -2294,8 +2294,8 @@ redeclare_class_template (type, parms)
 
   if (TREE_VEC_LENGTH (parms) != TREE_VEC_LENGTH (tmpl_parms))
     {
-      cp_error_at (ec_previous_declaration, tmpl);
-      cp_error (ec_used_d_template_parameters_instead_of_d,
+      cp_error_at ("previous declaration `%D'", tmpl);
+      cp_error ("used %d template parameter%s instead of %d",
                TREE_VEC_LENGTH (tmpl_parms), 
                TREE_VEC_LENGTH (tmpl_parms) == 1 ? "" : "s",
                TREE_VEC_LENGTH (parms));
@@ -2311,8 +2311,8 @@ redeclare_class_template (type, parms)
 
       if (TREE_CODE (tmpl_parm) != TREE_CODE (parm))
        {
-         cp_error_at (ec_template_parameter, tmpl_parm);
-         cp_error (ec_redeclared_here_as, parm);
+         cp_error_at ("template parameter `%#D'", tmpl_parm);
+         cp_error ("redeclared here as `%#D'", parm);
          return;
        }
 
@@ -2322,8 +2322,8 @@ redeclare_class_template (type, parms)
 
             A template-parameter may not be given default arguments
             by two different declarations in the same scope.  */
-         cp_error (ec_redefinition_of_default_argument_for, parm);
-         cp_error_at (ec_original_definition_appeared_here, tmpl_parm);
+         cp_error ("redefinition of default argument for `%#D'", parm);
+         cp_error_at ("  original definition appeared here", tmpl_parm);
          return;
        }
 
@@ -2392,7 +2392,7 @@ convert_nontype_argument (type, expr)
       if (! TREE_CONSTANT (expr))
        {
        non_constant:
-         cp_error (ec_nonconstant_cannot_be_used_as_template_argument,
+         cp_error ("non-constant `%E' cannot be used as template argument",
                    expr);
          return NULL_TREE;
        }
@@ -2409,8 +2409,8 @@ convert_nontype_argument (type, expr)
       if (TREE_CODE (e) != ADDR_EXPR)
        {
        bad_argument:
-         cp_error (ec_is_not_a_valid_template_argument, expr);
-         cp_error (ec_it_must_be_ss_with_external_linkage,
+         cp_error ("`%E' is not a valid template argument", expr);
+         error ("it must be %s%s with external linkage",
                 TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE
                 ? "a pointer to " : "",
                 TREE_CODE (TREE_TYPE (TREE_TYPE (expr))) == FUNCTION_TYPE
@@ -2423,9 +2423,9 @@ convert_nontype_argument (type, expr)
       
       if (TREE_CODE (referent) == STRING_CST)
        {
-         cp_error (ec_string_literal_is_not_a_valid_template_argument
+         cp_error ("string literal %E is not a valid template argument"
                    referent);
-         cp_error (ec_because_it_is_the_address_of_an_object_with_static_linkage);
+         error ("because it is the address of an object with static linkage");
          return NULL_TREE;
        }
 
@@ -2436,7 +2436,7 @@ convert_nontype_argument (type, expr)
        goto bad_argument;
       else if (!TREE_PUBLIC (referent))
        {
-         cp_error (ec_address_of_nonextern_cannot_be_used_as_template_argument, referent); 
+         cp_error ("address of non-extern `%E' cannot be used as template argument", referent); 
          return error_mark_node;
        }
     }
@@ -2447,7 +2447,7 @@ convert_nontype_argument (type, expr)
     }
   else 
     {
-      cp_error (ec_object_cannot_be_used_as_template_argument, expr);
+      cp_error ("object `%E' cannot be used as template argument", expr);
       return NULL_TREE;
     }
 
@@ -2816,8 +2816,8 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
   if (requires_type && ! is_type && TREE_CODE (arg) == SCOPE_REF
       && TREE_CODE (TREE_OPERAND (arg, 0)) == TEMPLATE_TYPE_PARM)
     {
-      cp_pedwarn (ec_to_refer_to_a_type_member_of_a_template_parameter);
-      cp_pedwarn (ec_use_typename, arg);
+      cp_pedwarn ("to refer to a type member of a template parameter,");
+      cp_pedwarn ("  use `typename %E'", arg);
       
       arg = make_typename_type (TREE_OPERAND (arg, 0),
                                TREE_OPERAND (arg, 1));
@@ -2829,14 +2829,14 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
        {
          if (complain)
            {
-             cp_error (ec_typevalue_mismatch_at_argument_d_in_template_parameter_list_for,
+             cp_error ("type/value mismatch at argument %d in template parameter list for `%D'",
                        i + 1, in_decl);
              if (is_type)
-               cp_error (ec_expected_a_constant_of_type_got,
+               cp_error ("  expected a constant of type `%T', got `%T'",
                          TREE_TYPE (parm),
                          (is_tmpl_type ? DECL_NAME (arg) : arg));
              else
-               cp_error (ec_expected_a_type_got_expr, arg);
+               cp_error ("  expected a type, got `%E'", arg);
            }
        }
       return error_mark_node;
@@ -2845,12 +2845,12 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
     {
       if (in_decl && complain)
        {
-         cp_error (ec_typevalue_mismatch_at_argument_d_in_template_parameter_list_for,
+         cp_error ("type/value mismatch at argument %d in template parameter list for `%D'",
                    i + 1, in_decl);
          if (is_tmpl_type)
-           cp_error (ec_expected_a_type_got_type, DECL_NAME (arg));
+           cp_error ("  expected a type, got `%T'", DECL_NAME (arg));
          else
-           cp_error (ec_expected_a_class_template_got, arg);
+           cp_error ("  expected a class template, got `%T'", arg);
        }
       return error_mark_node;
     }
@@ -2877,9 +2877,9 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
            {
              if (in_decl && complain)
                {
-                 cp_error (ec_typevalue_mismatch_at_argument_d_in_template_parameter_list_for,
+                 cp_error ("type/value mismatch at argument %d in template parameter list for `%D'",
                            i + 1, in_decl);
-                 cp_error (ec_expected_a_template_of_type_got, parm, arg);
+                 cp_error ("  expected a template of type `%D', got `%D'", parm, arg);
                }
                  
              val = error_mark_node;
@@ -2899,9 +2899,11 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
              if (t)
                {
                  if (ANON_AGGRNAME_P (TYPE_IDENTIFIER (t)))
-                   cp_pedwarn (ec_templateargument_uses_anonymous_type, val);
+                   cp_pedwarn
+                     ("template-argument `%T' uses anonymous type", val);
                  else
-                   cp_error (ec_templateargument_uses_local_type,
+                   cp_error
+                     ("template-argument `%T' uses local type `%T'",
                       val, t);
                  return error_mark_node;
                }
@@ -2933,7 +2935,7 @@ convert_template_argument (parm, arg, args, complain, i, in_decl)
       if (val == NULL_TREE)
        val = error_mark_node;
       else if (val == error_mark_node && complain)
-       cp_error (ec_could_not_convert_template_argument_to
+       cp_error ("could not convert template argument `%E' to `%T'"
                  arg, t);
     }
 
@@ -2980,11 +2982,11 @@ coerce_template_parms (parms, args, in_decl,
     {
       if (complain) 
        {
-         cp_error (ec_wrong_number_of_template_arguments_d_should_be_d,
+         cp_error ("wrong number of template arguments (%d, should be %d)",
                    nargs, nparms);
          
          if (in_decl)
-           cp_error_at (ec_provided_for, in_decl);
+           cp_error_at ("provided for `%D'", in_decl);
        }
 
       return error_mark_node;
@@ -3030,7 +3032,7 @@ coerce_template_parms (parms, args, in_decl,
        }
       else if (arg == error_mark_node)
        {
-         cp_error (ec_template_argument_d_is_invalid, i + 1);
+         cp_error ("template argument %d is invalid", i + 1);
          arg = error_mark_node;
        }
       else 
@@ -3235,7 +3237,7 @@ lookup_template_function (fns, arglist)
 
   if (fns == NULL_TREE)
     {
-      cp_error (ec_nontemplate_used_as_template);
+      cp_error ("non-template used as template");
       return error_mark_node;
     }
 
@@ -3354,9 +3356,9 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
 
   if (TREE_CODE (template) != TEMPLATE_DECL)
     {
-      cp_error (ec_nontemplate_type_used_as_a_template, d1);
+      cp_error ("non-template type `%T' used as a template", d1);
       if (in_decl)
-       cp_error_at (ec_for_template_declaration, in_decl);
+       cp_error_at ("for template declaration `%D'", in_decl);
       return error_mark_node;
     }
 
@@ -3431,7 +3433,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
               We should catch this error sooner (at the opening curly
               for `S', but it is better to be safe than sorry here.  */
            {
-             cp_error (ec_invalid_use_of, template);
+             cp_error ("invalid use of `%D'", template);
              return error_mark_node;
            }
 
@@ -3954,10 +3956,10 @@ push_tinst_level (d)
        return 0;
 
       last_template_error_tick = tinst_level_tick;
-      cp_error (ec_template_instantiation_depth_exceeds_maximum_of_d,
+      error ("template instantiation depth exceeds maximum of %d",
             max_tinst_depth);
-      cp_error (ec_use_ftemplatedepth_to_increase_the_maximum);
-      cp_error (ec_instantiating, d);
+      error (" (use -ftemplate-depth-NN to increase the maximum)");
+      cp_error ("  instantiating `%D'", d);
 
       print_template_context (0);
 
@@ -4274,13 +4276,13 @@ instantiate_class_template (type)
   if (t == error_mark_node)
     {
       char *str = "candidates are:";
-      cp_error (ec_ambiguous_class_template_instantiation_for, type);
+      cp_error ("ambiguous class template instantiation for `%#T'", type);
       for (t = DECL_TEMPLATE_SPECIALIZATIONS (template); t; t = TREE_CHAIN (t))
        {
          if (get_class_bindings (TREE_VALUE (t), TREE_PURPOSE (t),
                                  args))
            {
-             cp_error_at (ec_type, str, TREE_TYPE (t));
+             cp_error_at ("%s %+#T", str, TREE_TYPE (t));
              str = "               ";
            }
        }
@@ -4431,10 +4433,11 @@ instantiate_class_template (type)
            basetype = TREE_TYPE (elt);
 
            if (! IS_AGGR_TYPE (basetype))
-             cp_error (ec_base_type_of_fails_to_be_a_struct_or_class_type,
+             cp_error
+               ("base type `%T' of `%T' fails to be a struct or class type",
                 basetype, type);
            else if (TYPE_SIZE (complete_type (basetype)) == NULL_TREE)
-             cp_error (ec_base_class_of_has_incomplete_type,
+             cp_error ("base class `%T' of `%T' has incomplete type",
                        basetype, type);
 
            /* These are set up in xref_basetypes for normal classes, so
@@ -5254,7 +5257,7 @@ tsubst_decl (t, args, type, in_decl)
        DECL_INITIAL (r) = tsubst_expr (DECL_INITIAL (t), args, in_decl);
        TREE_CHAIN (r) = NULL_TREE;
        if (TREE_CODE (type) == VOID_TYPE)
-         cp_error_at (ec_instantiation_of_as_type_void, r);
+         cp_error_at ("instantiation of `%D' as type void", r);
       }
       break;
 
@@ -5313,7 +5316,7 @@ tsubst_decl (t, args, type, in_decl)
 
        TREE_CHAIN (r) = NULL_TREE;
        if (TREE_CODE (type) == VOID_TYPE)
-         cp_error_at (ec_instantiation_of_as_type_void, r);
+         cp_error_at ("instantiation of `%D' as type void", r);
       }
       break;
 
@@ -5644,7 +5647,7 @@ tsubst (t, args, in_decl)
            if (last_line != lineno ||
                last_file != input_filename)
              {
-               cp_error (ec_cannot_form_type_s_to_reference_type_during_template_instantiation,
+               cp_error ("cannot form type %s to reference type %T during template instantiation",
                          (code == POINTER_TYPE) ? "pointer" : "reference",
                          type);
                last_line = lineno;
@@ -6425,8 +6428,8 @@ instantiate_template (tmpl, targ_ptr)
          tree nt = target_type (t);
          if (IS_AGGR_TYPE (nt) && decl_function_context (TYPE_MAIN_DECL (nt)))
            {
-             cp_error (ec_type_composed_from_a_local_class_is_not_a_valid_templateargument, t);
-             cp_error (ec_trying_to_instantiate, gen_tmpl);
+             cp_error ("type `%T' composed from a local class is not a valid template-argument", t);
+             cp_error ("  trying to instantiate `%D'", gen_tmpl);
              fndecl = error_mark_node;
              goto out;
            }
@@ -6829,7 +6832,7 @@ type_unification_real (tparms, targs, parms, args, subr,
       if (TREE_VEC_ELT (targs, i) == NULL_TREE)
        {
          if (!allow_incomplete)
-           cp_error (ec_incomplete_type_unification);
+           error ("incomplete type unification");
          return 2;
        }
   return 0;
@@ -7661,7 +7664,7 @@ do_decl_instantiation (declspecs, declarator, storage)
 
   if (! DECL_LANG_SPECIFIC (decl))
     {
-      cp_error (ec_explicit_instantiation_of_nontemplate, decl);
+      cp_error ("explicit instantiation of non-template `%#D'", decl);
       return;
     }
   else if (TREE_CODE (decl) == VAR_DECL)
@@ -7677,13 +7680,13 @@ do_decl_instantiation (declspecs, declarator, storage)
       result = lookup_field (DECL_CONTEXT (decl), DECL_NAME (decl), 0, 0);
       if (result && TREE_CODE (result) != VAR_DECL)
        {
-         cp_error (ec_no_matching_template_for_found, result);
+         cp_error ("no matching template for `%D' found", result);
          return;
        }
     }
   else if (TREE_CODE (decl) != FUNCTION_DECL)
     {
-      cp_error (ec_explicit_instantiation_of, decl);
+      cp_error ("explicit instantiation of `%#D'", decl);
       return;
     }
   else
@@ -7700,8 +7703,8 @@ do_decl_instantiation (declspecs, declarator, storage)
 
         No program shall both explicitly instantiate and explicitly
         specialize a template.  */
-      cp_error (ec_explicit_instantiation_of_after, result);
-      cp_error_at (ec_explicit_specialization_here, result);
+      cp_error ("explicit instantiation of `%#D' after", result);
+      cp_error_at ("explicit specialization here", result);
       return;
     }
   else if (DECL_EXPLICIT_INSTANTIATION (result))
@@ -7715,7 +7718,7 @@ do_decl_instantiation (declspecs, declarator, storage)
         first instantiation was `extern' and the second is not, and
         EXTERN_P for the opposite case.  */
       if (DECL_INTERFACE_KNOWN (result) && !extern_p)
-       cp_error (ec_duplicate_explicit_instantiation_of, result);
+       cp_error ("duplicate explicit instantiation of `%#D'", result);
 
       /* If we've already instantiated the template, just return now.  */
       if (DECL_INTERFACE_KNOWN (result))
@@ -7723,12 +7726,12 @@ do_decl_instantiation (declspecs, declarator, storage)
     }
   else if (!DECL_IMPLICIT_INSTANTIATION (result))
     {
-      cp_error (ec_no_matching_template_for_found, result);
+      cp_error ("no matching template for `%D' found", result);
       return;
     }
   else if (!DECL_TEMPLATE_INFO (result))
     {
-      cp_pedwarn (ec_explicit_instantiation_of_nontemplate, result);
+      cp_pedwarn ("explicit instantiation of non-template `%#D'", result);
       return;
     }
 
@@ -7740,11 +7743,11 @@ do_decl_instantiation (declspecs, declarator, storage)
   else if (storage == ridpointers[(int) RID_EXTERN])
     {
       if (pedantic)
-       cp_pedwarn (ec_forbids_the_use_of_extern_on_explicit_instantiations);
+       cp_pedwarn ("ANSI C++ forbids the use of `extern' on explicit instantiations");
       extern_p = 1;
     }
   else
-    cp_error (ec_storage_class_applied_to_template_instantiation,
+    cp_error ("storage class `%D' applied to template instantiation",
              storage);
 
   SET_DECL_EXPLICIT_INSTANTIATION (result);
@@ -7784,7 +7787,7 @@ do_type_instantiation (t, storage)
 
   if (! IS_AGGR_TYPE (t) || ! CLASSTYPE_TEMPLATE_INFO (t))
     {
-      cp_error (ec_explicit_instantiation_of_nontemplate_type, t);
+      cp_error ("explicit instantiation of non-template type `%T'", t);
       return;
     }
 
@@ -7797,7 +7800,7 @@ do_type_instantiation (t, storage)
 
   if (TYPE_SIZE (t) == NULL_TREE)
     {
-      cp_error (ec_explicit_instantiation_of_before_definition_of_template,
+      cp_error ("explicit instantiation of `%#T' before definition of template",
                t);
       return;
     }
@@ -7805,8 +7808,8 @@ do_type_instantiation (t, storage)
   if (storage != NULL_TREE)
     {
       if (pedantic)
-       cp_pedwarn (ec_forbids_the_use_of_s_on_explicit_instantiations
-                   IDENTIFIER_POINTER (storage));
+       cp_pedwarn("ANSI C++ forbids the use of `%s' on explicit instantiations"
+                  IDENTIFIER_POINTER (storage));
 
       if (storage == ridpointers[(int) RID_INLINE])
        nomem_p = 1;
@@ -7816,7 +7819,7 @@ do_type_instantiation (t, storage)
        static_p = 1;
       else
        {
-         cp_error (ec_storage_class_applied_to_template_instantiation,
+         cp_error ("storage class `%D' applied to template instantiation",
                    storage);
          extern_p = 0;
        }
@@ -7828,8 +7831,8 @@ do_type_instantiation (t, storage)
 
         No program shall both explicitly instantiate and explicitly
         specialize a template.  */
-      cp_error (ec_explicit_instantiation_of_type_after, t);
-      cp_error_at (ec_explicit_specialization_here, t);
+      cp_error ("explicit instantiation of `%#T' after", t);
+      cp_error_at ("explicit specialization here", t);
       return;
     }
   else if (CLASSTYPE_EXPLICIT_INSTANTIATION (t))
@@ -7843,7 +7846,7 @@ do_type_instantiation (t, storage)
         instantiation was `extern', and if EXTERN_P then the second
         is.  Both cases are OK.  */
       if (!CLASSTYPE_INTERFACE_ONLY (t) && !extern_p)
-       cp_error (ec_duplicate_explicit_instantiation_of_type, t);
+       cp_error ("duplicate explicit instantiation of `%#T'", t);
       
       /* If we've already instantiated the template, just return now.  */
       if (!CLASSTYPE_INTERFACE_ONLY (t))
@@ -7939,11 +7942,11 @@ regenerate_decl_from_template (decl, tmpl)
   args = DECL_TI_ARGS (decl);
   code_pattern = DECL_TEMPLATE_RESULT (tmpl);
 
-  /* Unregister the specialization so that when we call tsubst we will
-     not just return DECL.  We don't have to unregister DECL from TMPL
-     (as opposed to GEN_TMPL) because if would only be registered
-     there if it were a partial instantiation of a specialization,
-     which it isn't: it's a full instantiation.  */
+  /* Unregister the specialization so that when we tsubst we will not
+     just return DECL.  We don't have to unregister DECL from TMPL
+     because if would only be registered there if it were a partial
+     instantiation of a specialization, which it isn't: it's a full
+     instantiation.  */
   gen_tmpl = most_general_template (tmpl);
   unregistered = unregister_specialization (decl, gen_tmpl);
 
@@ -8155,7 +8158,7 @@ instantiate_decl (d)
           member function or static data member of a class template
           shall be present in every translation unit in which it is
           explicitly instantiated.  */
-       cp_error (ec_explicit_instantiation_of_but_no_definition_available,
+       cp_error ("explicit instantiation of `%D' but no definition available",
                  d);
 
       add_pending_template (d);
@@ -8311,7 +8314,7 @@ add_maybe_template (d, fns)
     return;
   if (t == error_mark_node)
     {
-      cp_error (ec_ambiguous_template_instantiation_for, d);
+      cp_error ("ambiguous template instantiation for `%D'", d);
       return;
     }
 
index 6927fcf6969da6fb1908b0ef44ed3e27c2ab7ca5..742250dc6328fea0ca2dea3a88800c536e2c65d5 100644 (file)
@@ -254,7 +254,7 @@ get_base_filename (filename)
 
   if (p && ! compiling)
     {
-      cp_warning (ec_frepo_must_be_used_with_c);
+      warning ("-frepo must be used with -c");
       flag_use_repository = 0;
       return NULL;
     }
@@ -344,7 +344,7 @@ init_repo (filename)
          }
          break;
        default:
-         cp_error (ec_mysterious_repository_information_in_s, repo_name);
+         error ("mysterious repository information in %s", repo_name);
        }
       obstack_free (&temporary_obstack, buf);
     }
@@ -359,7 +359,7 @@ reopen_repo_file_for_write ()
 
   if (repo_file == 0)
     {
-      cp_error (ec_cant_create_repository_information_file_s, repo_name);
+      error ("can't create repository information file `%s'", repo_name);
       flag_use_repository = 0;
     }
 }
index c2af5f66298032f82bbb26267776ef406dab2e09..01c4a861ec25b0e1091c2369b0fdf013aea0382d 100644 (file)
@@ -101,7 +101,7 @@ build_headof (exp)
 
   if (TREE_CODE (type) != POINTER_TYPE)
     {
-      cp_error (ec_headof_applied_to_nonpointer_type);
+      error ("`headof' applied to non-pointer type");
       return error_mark_node;
     }
   type = TREE_TYPE (type);
@@ -190,7 +190,7 @@ get_tinfo_fn_dynamic (exp)
 
   if (type_unknown_p (exp))
     {
-      cp_error (ec_typeid_of_overloaded_function);
+      error ("typeid of overloaded function");
       return error_mark_node;
     }
 
@@ -211,7 +211,7 @@ get_tinfo_fn_dynamic (exp)
 
       if (! flag_rtti)
        {
-         cp_warning (ec_taking_dynamic_typeid_of_object_without_frtti);
+         warning ("taking dynamic typeid of object without -frtti");
          push_obstacks (&permanent_obstack, &permanent_obstack);
          init_rtti_processing ();
          pop_obstacks ();
@@ -401,7 +401,7 @@ get_typeid (type)
   
   if (! flag_rtti)
     {
-      cp_warning (ec_requesting_typeid_of_object_without_frtti);
+      warning ("requesting typeid of object without -frtti");
       push_obstacks (&permanent_obstack, &permanent_obstack);
       init_rtti_processing ();
       pop_obstacks ();
@@ -554,7 +554,7 @@ build_dynamic_cast_1 (type, expr)
              if (TREE_CODE (expr) == VAR_DECL
                  && TREE_CODE (TREE_TYPE (expr)) == RECORD_TYPE)
                {
-                 cp_warning (ec_dynamic_cast_of_to_can_never_succeed,
+                 cp_warning ("dynamic_cast of `%#D' to `%#T' can never succeed",
                              expr, type);
                  return throw_bad_cast ();
                }
@@ -566,7 +566,7 @@ build_dynamic_cast_1 (type, expr)
              if (TREE_CODE (op) == VAR_DECL
                  && TREE_CODE (TREE_TYPE (op)) == RECORD_TYPE)
                {
-                 cp_warning (ec_dynamic_cast_of_to_can_never_succeed,
+                 cp_warning ("dynamic_cast of `%#D' to `%#T' can never succeed",
                              expr, type);
                  retval = build_int_2 (0, 0); 
                  TREE_TYPE (retval) = type; 
@@ -650,7 +650,7 @@ build_dynamic_cast_1 (type, expr)
     }
 
  fail:
-  cp_error (ec_cannot_dynamic_cast_of_type_to_type,
+  cp_error ("cannot dynamic_cast `%E' (of type `%#T') to type `%#T'",
            expr, exprtype, type);
   return error_mark_node;
 }
index f53c988698e94b5d884bcced195b393a0fba855e..c472bf04360bdebe2d544c3ea2af4b33839e264c 100644 (file)
@@ -278,13 +278,13 @@ get_binfo (parent, binfo, protect)
 
   if (dist == -3)
     {
-      cp_error (ec_fields_of_are_inaccessible_in_due_to_private_inheritance,
+      cp_error ("fields of `%T' are inaccessible in `%T' due to private inheritance",
                parent, type);
       return error_mark_node;
     }
   else if (dist == -2 && protect)
     {
-      cp_error (ec_type_is_ambiguous_base_class_for_type, parent,
+      cp_error ("type `%T' is ambiguous base class for type `%T'", parent,
                type);
       return error_mark_node;
     }
@@ -884,7 +884,7 @@ lookup_field (xbasetype, name, protect, want_type)
      we know that binfo of a virtual base class will always == itself when
      found along any line.  (mrs)  */
 
-  error_code ec = ec_last_error_code;
+  char *errstr = 0;
 
 #if 0
   /* We cannot search for constructor/destructor names like this.  */
@@ -952,10 +952,20 @@ lookup_field (xbasetype, name, protect, want_type)
        {
          if (TREE_PRIVATE (rval) | TREE_PROTECTED (rval))
            this_v = compute_access (basetype_path, rval);
-         if (this_v == access_private_node)
-           ec = ec_private_in_class;
-         else if (this_v == access_protected_node)
-           ec = ec_protected_in_class;
+         if (TREE_CODE (rval) == CONST_DECL)
+           {
+             if (this_v == access_private_node)
+               errstr = "enum `%D' is a private value of class `%T'";
+             else if (this_v == access_protected_node)
+               errstr = "enum `%D' is a protected value of class `%T'";
+           }
+         else
+           {
+             if (this_v == access_private_node)
+               errstr = "member `%D' is a private member of class `%T'";
+             else if (this_v == access_protected_node)
+               errstr = "member `%D' is a protected member of class `%T'";
+           }
        }
 
       rval_binfo = basetype_path;
@@ -1064,7 +1074,7 @@ lookup_field (xbasetype, name, protect, want_type)
          else
            {
              /* This is ambiguous.  */
-             ec = ec_ambiguous_member;
+             errstr = "request for member `%D' is ambiguous";
              protect += 2;
              break;
            }
@@ -1099,10 +1109,10 @@ lookup_field (xbasetype, name, protect, want_type)
       }
 
     if (rval == NULL_TREE)
-      ec = ec_last_error_code;
+      errstr = 0;
 
     /* If this FIELD_DECL defines its own access level, deal with that.  */
-    if (rval && ec == ec_last_error_code
+    if (rval && errstr == 0
        && (protect & 1)
        && DECL_LANG_SPECIFIC (rval)
        && DECL_ACCESS (rval))
@@ -1118,7 +1128,7 @@ lookup_field (xbasetype, name, protect, want_type)
              new_v = compute_access (TREE_VALUE (TREE_CHAIN (*tp)), rval);
            if (this_v != access_default_node && new_v != this_v)
              {
-               ec = ec_conflicting_access;
+               errstr = "conflicting access to member `%D'";
                this_v = access_default_node;
              }
            own_access = new_v;
@@ -1137,18 +1147,20 @@ lookup_field (xbasetype, name, protect, want_type)
   }
   search_stack = pop_search_level (search_stack);
 
-  if (ec == ec_last_error_code)
+  if (errstr == 0)
     {
       if (own_access == access_private_node)
-       ec = ec_member_private;
+       errstr = "member `%D' declared private";
       else if (own_access == access_protected_node)
-       ec = ec_member_protected;
+       errstr = "member `%D' declared protected";
       else if (this_v == access_private_node)
-       ec = TREE_PRIVATE (rval)
-         ? ec_member_private : ec_member_in_private_base;
+       errstr = TREE_PRIVATE (rval)
+         ? "member `%D' is private"
+           : "member `%D' is from private base class";
       else if (this_v == access_protected_node)
-       ec = TREE_PROTECTED (rval)
-         ? ec_member_protected : ec_member_in_protected_base;
+       errstr = TREE_PROTECTED (rval)
+         ? "member `%D' is protected"
+           : "member `%D' is from protected base class";
     }
 
  out:
@@ -1160,9 +1172,9 @@ lookup_field (xbasetype, name, protect, want_type)
       protect = 0;
     }
 
-  if (ec != ec_last_error_code && protect)
+  if (errstr && protect)
     {
-      cp_error (ec, name, type);
+      cp_error (errstr, name, type);
       rval = error_mark_node;
     }
 
@@ -1231,7 +1243,7 @@ lookup_nested_field (name, complain)
                         enums in nested classes) when we do need to call
                         this fn at parse time.  So, in those cases, we pass
                         complain as a 0 and just return a NULL_TREE.  */
-                     cp_error (ec_assignment_to_nonstatic_member_of_enclosing_class,
+                     cp_error ("assignment to non-static member `%D' of enclosing class `%T'",
                                id, DECL_CONTEXT (t));
                      /* Mark this for do_identifier().  It would otherwise
                         claim that the variable was undeclared.  */
@@ -1355,7 +1367,7 @@ lookup_fnfields (basetype_path, name, complain)
   /* For now, don't try this.  */
   int protect = complain;
 
-  error_code ec = ec_last_error_code;
+  char *errstr = 0;
 
   if (complain == -1)
     {
@@ -1512,7 +1524,7 @@ lookup_fnfields (basetype_path, name, complain)
          else
            {
              /* This is ambiguous.  */
-             ec = ec_ambiguous_member;
+             errstr = "request for method `%D' is ambiguous";
              rvals = error_mark_node;
              break;
            }
@@ -1530,9 +1542,9 @@ lookup_fnfields (basetype_path, name, complain)
   }
   search_stack = pop_search_level (search_stack);
 
-  if (ec != ec_last_error_code && protect)
+  if (errstr && protect)
     {
-      cp_error (ec, name);
+      cp_error (errstr, name);
       rvals = error_mark_node;
     }
 
@@ -1842,21 +1854,21 @@ get_matching_virtual (binfo, fndecl, dtorp)
 
                      if (pedantic && i == -1)
                        {
-                         cp_pedwarn_at (ec_invalid_covariant_return_type_for_must_be_pointer_or_reference_to_class, fndecl);
-                         cp_pedwarn_at (ec_overriding, tmp);
+                         cp_pedwarn_at ("invalid covariant return type for `%#D' (must be pointer or reference to class)", fndecl);
+                         cp_pedwarn_at ("  overriding `%#D'", tmp);
                        }
                    }
                  else if (IS_AGGR_TYPE_2 (brettype, drettype)
                           && comptypes (brettype, drettype, 0))
                    {
-                     cp_error (ec_invalid_covariant_return_type_must_use_pointer_or_reference);
-                     cp_error_at (ec_overriding, tmp);
-                     cp_error_at (ec_with, fndecl);
+                     error ("invalid covariant return type (must use pointer or reference)");
+                     cp_error_at ("  overriding `%#D'", tmp);
+                     cp_error_at ("  with `%#D'", fndecl);
                    }
                  else if (IDENTIFIER_ERROR_LOCUS (name) == NULL_TREE)
                    {
-                     cp_error_at (ec_conflicting_return_type_specified_for_virtual_function, fndecl);
-                     cp_error_at (ec_overriding_definition_as, tmp);
+                     cp_error_at ("conflicting return type specified for virtual function `%#D'", fndecl);
+                     cp_error_at ("  overriding definition as `%#D'", tmp);
                      SET_IDENTIFIER_ERROR_LOCUS (name, basetype);
                    }
                  break;
@@ -2434,7 +2446,7 @@ virtual_context (fndecl, t, vbase)
            }
        }
       /* This shouldn't happen, I don't want errors! */
-      cp_warning (ec_recoverable_compiler_error_fixups_for_virtual_function);
+      warning ("recoverable compiler error, fixups for virtual function");
       return vbase;
     }
   while (path)
@@ -2697,7 +2709,7 @@ expand_indirect_vtbls_init (binfo, true_exp, decl_ptr)
          tree in_charge_node = lookup_name (in_charge_identifier, 0);
          if (! in_charge_node)
            {
-             cp_warning (ec_recoverable_internal_compiler_error_nobodys_in_charge);
+             warning ("recoverable internal compiler error, nobody's in charge!");
              in_charge_node = integer_zero_node;
            }
          in_charge_node = build_binary_op (EQ_EXPR, in_charge_node, integer_zero_node, 1);
@@ -2825,9 +2837,9 @@ envelope_add_decl (type, decl, values)
              || ! TREE_PRIVATE (value)))
        /* Should figure out access control more accurately.  */
        {
-         cp_warning_at (ec_member_is_shadowed, value);
-         cp_warning_at (ec_by_member_function, decl);
-         cp_warning (ec_in_this_context);
+         cp_warning_at ("member `%#D' is shadowed", value);
+         cp_warning_at ("by member function `%#D'", decl);
+         warning ("in this context");
        }
 
       context = DECL_REAL_CONTEXT (value);
index f2fbe642832b4f72deaecefbd583027f9c16fa99..eee6616698e05dcaec977b0f70440094ec4c2373 100644 (file)
@@ -453,7 +453,7 @@ finish_break_stmt ()
   if (processing_template_decl)
     add_tree (build_min_nt (BREAK_STMT));
   else if ( ! expand_exit_something ())
-    cp_error (ec_break_statement_not_within_loop_or_switch);
+    cp_error ("break statement not within loop or switch");
 }
 
 /* Finish a continue-statement.  */
@@ -465,7 +465,7 @@ finish_continue_stmt ()
   if (processing_template_decl)
     add_tree (build_min_nt (CONTINUE_STMT));
   else if (! expand_continue_loop (0))
-    cp_error (ec_continue_statement_not_within_a_loop);   
+    cp_error ("continue statement not within a loop");   
 }
 
 /* Begin a switch-statement.  */
@@ -735,7 +735,7 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
        {
          if (cv_qualifier != NULL_TREE
              && cv_qualifier != ridpointers[(int) RID_VOLATILE])
-           cp_warning (ec_qualifier_ignored_on_asm,
+           cp_warning ("%s qualifier ignored on asm",
                        IDENTIFIER_POINTER (cv_qualifier));
            
          c_expand_asm_operands (string, output_operands,
@@ -748,7 +748,7 @@ finish_asm_stmt (cv_qualifier, string, output_operands,
       else
        {
          if (cv_qualifier != NULL_TREE)
-           cp_warning (ec_qualifier_ignored_on_asm,
+           cp_warning ("%s qualifier ignored on asm",
                        IDENTIFIER_POINTER (cv_qualifier));
          expand_asm (string);
        }
@@ -895,15 +895,15 @@ finish_this_expr ()
   else if (current_function_decl
           && DECL_STATIC_FUNCTION_P (current_function_decl))
     {
-      cp_error (ec_this_is_unavailable_for_static_member_functions);
+      error ("`this' is unavailable for static member functions");
       result = error_mark_node;
     }
   else
     {
       if (current_function_decl)
-       cp_error (ec_invalid_use_of_this_in_nonmember_function);
+       error ("invalid use of `this' in non-member function");
       else
-       cp_error (ec_invalid_use_of_this_at_top_level);
+       error ("invalid use of `this' at top level");
       result = error_mark_node;
     }
 
@@ -941,7 +941,7 @@ finish_object_call_expr (fn, object, args)
        fn = DECL_NAME (fn);
       else
        {
-         cp_error (ec_calling_type_like_a_method, fn);
+         cp_error ("calling type `%T' like a method", fn);
          return error_mark_node;
        }
     }
@@ -961,7 +961,7 @@ finish_qualified_object_call_expr (fn, object, args)
 {
   if (IS_SIGNATURE (TREE_OPERAND (fn, 0)))
     {
-      cp_warning (ec_signature_name_in_scope_resolution_ignored);
+      warning ("signature name in scope resolution ignored");
       return finish_object_call_expr (TREE_OPERAND (fn, 1), object, args);
     }
   else
@@ -980,13 +980,13 @@ finish_pseudo_destructor_call_expr (object, scope, destructor)
      tree destructor;
 {
   if (scope && scope != destructor)
-    cp_error (ec_destructor_specifier_must_have_matching_names
+    cp_error ("destructor specifier `%T::~%T()' must have matching names"
              scope, destructor);
 
   if ((scope == NULL_TREE || IDENTIFIER_GLOBAL_VALUE (destructor))
       && (TREE_CODE (TREE_TYPE (object)) !=
          TREE_CODE (TREE_TYPE (IDENTIFIER_GLOBAL_VALUE (destructor)))))
-    cp_error (ec_is_not_of_type, object, destructor);
+    cp_error ("`%E' is not of type `%T'", object, destructor);
 
   return cp_convert (void_type_node, object);
 }
@@ -1159,7 +1159,7 @@ finish_template_type_parm (aggr, identifier)
     sorry ("signature as template type parameter");
   else if (aggr != class_type_node)
     {
-      cp_pedwarn (ec_template_type_parameters_must_use_the_keyword_class_or_typename);
+      pedwarn ("template type parameters must use the keyword `class' or `typename'");
       aggr = class_type_node;
     }
 
@@ -1459,19 +1459,19 @@ finish_base_specifier (access_specifier, base_class,
 
   if (base_class == NULL_TREE)
     {
-      cp_error (ec_invalid_base_class);
+      error ("invalid base class");
       type = error_mark_node;
     }
   else
     type = TREE_TYPE (base_class);
   if (current_aggr_is_signature && access_specifier)
-    cp_error (ec_access_and_source_specifiers_not_allowed_in_signature);
+    error ("access and source specifiers not allowed in signature");
   if (! is_aggr_type (type, 1))
     result = NULL_TREE;
   else if (current_aggr_is_signature
           && (! type) && (! IS_SIGNATURE (type)))
     {
-      cp_error (ec_class_name_not_allowed_as_base_signature);
+      error ("class name not allowed as base signature");
       result = NULL_TREE;
     }
   else if (current_aggr_is_signature)
@@ -1482,7 +1482,7 @@ finish_base_specifier (access_specifier, base_class,
     }
   else if (type && IS_SIGNATURE (type))
     {
-      cp_error (ec_signature_name_not_allowed_as_base_class);
+      error ("signature name not allowed as base class");
       result = NULL_TREE;
     }
   else
index e4ba4b7ab8db29c76767a6ff2ab7a3bf59fa9120..65350db79625580c69f0ae996b91d6f6acb898a1 100644 (file)
@@ -492,7 +492,7 @@ build_signature_table_constructor (sig_ty, rhs)
 
              if (oty_type == NULL_TREE || oty_type == error_mark_node)
                {
-                 cp_error (ec_class_does_not_contain_type,
+                 cp_error ("class `%T' does not contain type `%T'",
                            rhstype, oty_type);
                  undo_casts (sig_ty);
                  return error_mark_node;
@@ -518,7 +518,7 @@ build_signature_table_constructor (sig_ty, rhs)
        {
          if (! IS_DEFAULT_IMPLEMENTATION (sig_method))
            {
-             cp_error (ec_class_does_not_contain_method,
+             cp_error ("class `%T' does not contain method `%D'",
                        rhstype, sig_mname);
              undo_casts (sig_ty);
              return error_mark_node;
@@ -549,7 +549,7 @@ build_signature_table_constructor (sig_ty, rhs)
              || (compute_access (basetypes, rhs_method)
                  != access_public_node))
            {
-             cp_error (ec_class_s_does_not_contain_a_method_conforming_to_s,
+             error ("class `%s' does not contain a method conforming to `%s'",
                     TYPE_NAME_STRING (rhstype),
                     fndecl_as_string (sig_method, 1));
              undo_casts (sig_ty);
@@ -735,7 +735,7 @@ build_sigtable (sig_type, rhs_type, init_from)
       if (SIGNATURE_HAS_OPAQUE_TYPEDECLS (sig_type)
          && SIGTABLE_HAS_BEEN_GENERATED (sig_type))
        {
-         cp_error (ec_signature_with_opaque_type_implemented_by_multiple_classes);
+         error ("signature with opaque type implemented by multiple classes");
          return error_mark_node;
        }
       SIGTABLE_HAS_BEEN_GENERATED (sig_type) = 1;
@@ -806,13 +806,13 @@ build_signature_pointer_constructor (lhs, rhs)
             && (IS_SIGNATURE_POINTER (rhstype)
                 || IS_SIGNATURE_REFERENCE (rhstype)))))
     {
-      cp_error (ec_invalid_assignment_to_signature_pointer_or_reference);
+      error ("invalid assignment to signature pointer or reference");
       return error_mark_node;
     }
 
   if (TYPE_SIZE (sig_ty) == NULL_TREE)
     {
-      cp_error (ec_undefined_signature_used_in_signature_s_declaration,
+      cp_error ("undefined signature `%T' used in signature %s declaration",
                sig_ty,
                IS_SIGNATURE_POINTER (lhstype) ? "pointer" : "reference");
       return error_mark_node;
@@ -1018,7 +1018,7 @@ build_signature_method_call (function, parms)
       || (IS_DEFAULT_IMPLEMENTATION (function)
          && (!deflt_call || deflt_call == error_mark_node)))
     {
-      cp_compiler_error (ec_cannot_build_call_of_signature_member_function_s,
+      compiler_error ("cannot build call of signature member function `%s'",
                      fndecl_as_string (function, 1));
       return error_mark_node;
     }
index b4980685ca80b4174a2a8a4a1a04f0ef76ecca3c..41475b5f46782f29b6c1c8f56fb5c434a64128c8 100644 (file)
@@ -221,7 +221,7 @@ lvalue_or_else (ref, string)
 {
   int win = lvalue_p (ref);
   if (! win)
-    cp_error (ec_nonlvalue_in_s, string);
+    error ("non-lvalue in %s", string);
   return win;
 }
 
@@ -755,7 +755,7 @@ layout_basetypes (rec, max)
       my_friendly_assert (TREE_TYPE (field) == basetype, 23897);
 
       if (get_base_distance (basetype, rec, 0, (tree*)0) == -2)
-       cp_warning (ec_direct_base_inaccessible_in_due_to_ambiguity,
+       cp_warning ("direct base `%T' inaccessible in `%T' due to ambiguity",
                    basetype, rec);
 
       BINFO_OFFSET (base_binfo)
@@ -776,7 +776,7 @@ layout_basetypes (rec, max)
        {
          tree basetype = BINFO_TYPE (vbase_types);
          if (get_base_distance (basetype, rec, 0, (tree*)0) == -2)
-           cp_warning (ec_virtual_base_inaccessible_in_due_to_ambiguity,
+           cp_warning ("virtual base `%T' inaccessible in `%T' due to ambiguity",
                        basetype, rec);
        }
     }
@@ -1240,7 +1240,7 @@ binfo_value (elem, type)
      tree type;
 {
   if (get_base_distance (elem, type, 0, (tree *)0) == -2)
-    cp_compiler_error (ec_base_class_s_ambiguous_in_binfo_value,
+    compiler_error ("base class `%s' ambiguous in binfo_value",
                    TYPE_NAME_STRING (elem));
   if (elem == type)
     return TYPE_BINFO (type);
index dce89d8d764e8fcbdb276ff3f096ce4eab3a8f6c..50ab3e6d14403a777a548f4130c36055d6e2fe74 100644 (file)
@@ -216,7 +216,7 @@ require_instantiated_type (type, exp, errval)
 {
   if (TREE_TYPE (exp) == NULL_TREE)
     {
-      cp_error (ec_argument_list_may_not_have_an_initializer_list);
+      error ("argument list may not have an initializer list");
       return errval;
     }
 
@@ -590,7 +590,7 @@ common_type (t1, t2)
        return build_type_attribute_variant (t2, attributes);
       else
        {
-         cp_compiler_error (ec_common_type_called_with_uncommon_aggregate_types);
+         compiler_error ("common_type called with uncommon aggregate types");
          return error_mark_node;
        }
 
@@ -611,7 +611,7 @@ common_type (t1, t2)
          else
            {
              if (binfo_or_else (b2, b1) == NULL_TREE)
-               cp_compiler_error (ec_common_type_called_with_uncommon_method_types);
+               compiler_error ("common_type called with uncommon method types");
              basetype = TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t1)));
            }
 
@@ -630,7 +630,7 @@ common_type (t1, t2)
          t1 = build_exception_variant (t3, raises);
        }
       else
-        cp_compiler_error (ec_common_type_called_with_uncommon_method_types);
+        compiler_error ("common_type called with uncommon method types");
 
       return build_type_attribute_variant (t1, attributes);
 
@@ -646,7 +646,7 @@ common_type (t1, t2)
          else if (binfo_or_else (b2, b1))
            return build_type_attribute_variant (t1, attributes);
        }
-      cp_compiler_error (ec_common_type_called_with_uncommon_member_types);
+      compiler_error ("common_type called with uncommon member types");
 
     default:
       return build_type_attribute_variant (t1, attributes);
@@ -1269,7 +1269,7 @@ comp_target_parms (parms1, parms2, strict)
 
   if (t1 == 0 && t2 != 0)
     {
-      cp_pedwarn (ec_prohibits_conversion_from_to,
+      cp_pedwarn ("ANSI C++ prohibits conversion from `(%#T)' to `(...)'",
                  parms2);
       return self_promoting_args_p (t2);
     }
@@ -1470,19 +1470,19 @@ c_sizeof (type)
   if (code == FUNCTION_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_taking_the_sizeof_a_function_type);
+       pedwarn ("ANSI C++ forbids taking the sizeof a function type");
       return size_int (1);
     }
   if (code == METHOD_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_taking_the_sizeof_a_method_type);
+       pedwarn ("ANSI C++ forbids taking the sizeof a method type");
       return size_int (1);
     }
   if (code == VOID_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_taking_the_sizeof_a_void_type);
+       pedwarn ("ANSI C++ forbids taking the sizeof a void type");
       return size_int (1);
     }
   if (code == ERROR_MARK)
@@ -1507,13 +1507,13 @@ c_sizeof (type)
         In that case we should be able to do better.  */
   if (IS_SIGNATURE (type))
     {
-      cp_error (ec_sizeof_applied_to_a_signature_type);
+      error ("`sizeof' applied to a signature type");
       return size_int (0);
     }
 
   if (TYPE_SIZE (complete_type (type)) == 0)
     {
-      cp_error (ec_sizeof_applied_to_incomplete_type, type);
+      cp_error ("`sizeof' applied to incomplete type `%T'", type);
       return size_int (0);
     }
 
@@ -1536,7 +1536,7 @@ expr_sizeof (e)
 
   if (TREE_CODE (e) == COMPONENT_REF
       && DECL_BIT_FIELD (TREE_OPERAND (e, 1)))
-    cp_error (ec_sizeof_applied_to_a_bitfield);
+    error ("sizeof applied to a bit-field");
   /* ANSI says arrays and functions are converted inside comma.
      But we can't really convert them in build_compound_expr
      because that would break commas in lvalues.
@@ -1552,7 +1552,7 @@ expr_sizeof (e)
          && ((TREE_TYPE (t)
               && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
              || is_overloaded_fn (t)))
-       cp_pedwarn (ec_forbids_taking_the_sizeof_a_function_type);
+       pedwarn ("ANSI C++ forbids taking the sizeof a function type");
     }
   return c_sizeof (TREE_TYPE (e));
 }
@@ -1610,7 +1610,7 @@ c_alignof (type)
         In that case we should be able to do better.  */
   if (IS_SIGNATURE (type))
     {
-      cp_error (ec_alignof_applied_to_a_signature_type);
+      error ("`__alignof' applied to a signature type");
       return size_int (1);
     }
 
@@ -1643,7 +1643,7 @@ decay_conversion (exp)
 
       if (type == unknown_type_node)
        {
-         cp_pedwarn (ec_assuming_on_overloaded_member_function);
+         cp_pedwarn ("assuming & on overloaded member function");
          return build_unary_op (ADDR_EXPR, exp, 0);
        }
     }
@@ -1670,7 +1670,7 @@ decay_conversion (exp)
 
   if (code == VOID_TYPE)
     {
-      cp_error (ec_void_value_not_ignored_as_it_ought_to_be);
+      error ("void value not ignored as it ought to be");
       return error_mark_node;
     }
   if (code == FUNCTION_TYPE)
@@ -1679,7 +1679,7 @@ decay_conversion (exp)
     }
   if (code == METHOD_TYPE)
     {
-      cp_pedwarn (ec_assuming_on, exp);
+      cp_pedwarn ("assuming & on `%E'", exp);
       return build_unary_op (ADDR_EXPR, exp, 0);
     }
   if (code == ARRAY_TYPE)
@@ -1715,7 +1715,7 @@ decay_conversion (exp)
       if (!lvalue_p (exp)
          && ! (TREE_CODE (exp) == CONSTRUCTOR && TREE_STATIC (exp)))
        {
-         cp_error (ec_invalid_use_of_nonlvalue_array);
+         error ("invalid use of non-lvalue array");
          return error_mark_node;
        }
 
@@ -1826,7 +1826,7 @@ string_conv_p (totype, exp, warn)
 
   /* This warning is not very useful, as it complains about printf.  */
   if (warn && warn_write_strings)
-    cp_warning (ec_deprecated_conversion_from_string_constant_to_char);
+    cp_warning ("deprecated conversion from string constant to `char *'");
 
   return 1;
 }
@@ -1844,13 +1844,13 @@ build_object_ref (datum, basetype, field)
     dtype = TREE_TYPE (dtype);
   if (! IS_AGGR_TYPE_CODE (TREE_CODE (dtype)))
     {
-      cp_error (ec_request_for_member_in_expression_of_nonaggregate_type,
+      cp_error ("request for member `%T::%D' in expression of non-aggregate type `%T'",
                basetype, field, dtype);
       return error_mark_node;
     }
   else if (IS_SIGNATURE (basetype))
     {
-      cp_warning (ec_signature_name_in_scope_resolution_ignored);
+      warning ("signature name in scope resolution ignored");
       return build_component_ref (datum, field, NULL_TREE, 1);
     }
   else if (is_aggr_type (basetype, 1))
@@ -1983,7 +1983,7 @@ build_component_ref (datum, component, basetype_path, protect)
                              basetype_path, protect));
 
     case TEMPLATE_DECL:
-      cp_error (ec_invalid_use_of, datum);
+      cp_error ("invalid use of %D", datum);
       datum = error_mark_node;
       break;
 
@@ -2021,7 +2021,7 @@ build_component_ref (datum, component, basetype_path, protect)
   if (! IS_AGGR_TYPE_CODE (code))
     {
       if (code != ERROR_MARK)
-       cp_error (ec_request_for_member_in_which_is_of_nonaggregate_type,
+       cp_error ("request for member `%D' in `%E', which is of non-aggregate type `%T'",
                  component, datum, basetype);
       return error_mark_node;
     }
@@ -2033,13 +2033,13 @@ build_component_ref (datum, component, basetype_path, protect)
     {
       if (TYPE_IDENTIFIER (basetype) != TREE_OPERAND (component, 0))
        {
-         cp_error (ec_destructor_specifier_must_have_matching_names,
+         cp_error ("destructor specifier `%T::~%T' must have matching names",
                    basetype, TREE_OPERAND (component, 0));
          return error_mark_node;
        }
       if (! TYPE_HAS_DESTRUCTOR (basetype))
        {
-         cp_error (ec_type_has_no_destructor, basetype);
+         cp_error ("type `%T' has no destructor", basetype);
          return error_mark_node;
        }
       return TREE_VEC_ELT (CLASSTYPE_METHOD_VEC (basetype), 1);
@@ -2056,7 +2056,7 @@ build_component_ref (datum, component, basetype_path, protect)
     field = component;
   else if (TREE_CODE (component) == TYPE_DECL)
     {
-      cp_pedwarn (ec_invalid_use_of_type_decl_as_expression, component);
+      cp_pedwarn ("invalid use of type decl `%#D' as expression", component);
       return component;
     }
   else
@@ -2117,9 +2117,9 @@ build_component_ref (datum, component, basetype_path, protect)
                                    datum, fndecl);
                    }
                  if (access == access_protected_node)
-                   cp_error (ec_member_function_is_protected, fndecl);
+                   cp_error ("member function `%D' is protected", fndecl);
                  else
-                   cp_error (ec_member_function_is_private, fndecl);
+                   cp_error ("member function `%D' is private", fndecl);
                  return error_mark_node;
                }
              else
@@ -2135,7 +2135,7 @@ build_component_ref (datum, component, basetype_path, protect)
                }
            }
 
-         cp_error (ec_has_no_member_named, basetype, name);
+         cp_error ("`%#T' has no member named `%D'", basetype, name);
          return error_mark_node;
        }
       else if (TREE_TYPE (field) == error_mark_node)
@@ -2144,7 +2144,7 @@ build_component_ref (datum, component, basetype_path, protect)
       if (TREE_CODE (field) != FIELD_DECL)
        {
          if (TREE_CODE (field) == TYPE_DECL)
-           cp_pedwarn (ec_invalid_use_of_type_decl_as_expression, field);
+           cp_pedwarn ("invalid use of type decl `%#D' as expression", field);
          else if (DECL_RTL (field) != 0)
            mark_used (field);
          else
@@ -2171,7 +2171,7 @@ build_component_ref (datum, component, basetype_path, protect)
          tree addr = build_unary_op (ADDR_EXPR, datum, 0);
          if (integer_zerop (addr))
            {
-             cp_error (ec_invalid_reference_to_ptr_use_ptrtomember_instead);
+             error ("invalid reference to NULL ptr, use ptr-to-member instead");
              return error_mark_node;
            }
          if (VBASE_NAME_P (DECL_NAME (field)))
@@ -2300,16 +2300,16 @@ build_indirect_ref (ptr, errorstring)
   /* `pointer' won't be an error_mark_node if we were given a
      pointer to member, so it's cool to check for this here.  */
   else if (TYPE_PTRMEMFUNC_P (type))
-    cp_error (ec_invalid_use_of_s_on_pointer_to_member_function, errorstring);
+    error ("invalid use of `%s' on pointer to member function", errorstring);
   else if (TREE_CODE (type) == RECORD_TYPE
           && (IS_SIGNATURE_POINTER (type) || IS_SIGNATURE_REFERENCE (type)))
-    cp_error (ec_cannot_dereference_signature_pointerreference);
+    error ("cannot dereference signature pointer/reference");
   else if (pointer != error_mark_node)
     {
       if (errorstring)
-       cp_error (ec_invalid_type_argument_of_s, errorstring);
+       error ("invalid type argument of `%s'", errorstring);
       else
-       cp_error (ec_invalid_type_argument);
+       error ("invalid type argument");
     }
   return error_mark_node;
 }
@@ -2333,7 +2333,7 @@ build_array_ref (array, idx)
 {
   if (idx == 0)
     {
-      cp_error (ec_subscript_missing_in_array_reference);
+      error ("subscript missing in array reference");
       return error_mark_node;
     }
 
@@ -2354,14 +2354,14 @@ build_array_ref (array, idx)
         must have done so deliberately.  */
       if (warn_char_subscripts
          && TYPE_MAIN_VARIANT (TREE_TYPE (idx)) == char_type_node)
-       cp_warning (ec_array_subscript_has_type_char);
+       warning ("array subscript has type `char'");
 
       /* Apply default promotions *after* noticing character types.  */
       idx = default_conversion (idx);
 
       if (TREE_CODE (TREE_TYPE (idx)) != INTEGER_TYPE)
        {
-         cp_error (ec_array_subscript_is_not_an_integer);
+         error ("array subscript is not an integer");
          return error_mark_node;
        }
 
@@ -2390,7 +2390,7 @@ build_array_ref (array, idx)
        }
 
       if (pedantic && !lvalue_p (array))
-       cp_pedwarn (ec_forbids_subscripting_nonlvalue_array);
+       pedwarn ("ANSI C++ forbids subscripting non-lvalue array");
 
       /* Note in C++ it is valid to subscript a `register' array, since
         it is valid to take the address of something with that
@@ -2401,7 +2401,7 @@ build_array_ref (array, idx)
          while (TREE_CODE (foo) == COMPONENT_REF)
            foo = TREE_OPERAND (foo, 0);
          if (TREE_CODE (foo) == VAR_DECL && DECL_REGISTER (foo))
-           cp_warning (ec_subscripting_array_declared_register);
+           warning ("subscripting array declared `register'");
        }
 
       type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (array)));
@@ -2441,12 +2441,12 @@ build_array_ref (array, idx)
 
     if (TREE_CODE (TREE_TYPE (ar)) != POINTER_TYPE)
       {
-       cp_error (ec_subscripted_value_is_neither_array_nor_pointer);
+       error ("subscripted value is neither array nor pointer");
        return error_mark_node;
       }
     if (TREE_CODE (TREE_TYPE (ind)) != INTEGER_TYPE)
       {
-       cp_error (ec_array_subscript_is_not_an_integer);
+       error ("array subscript is not an integer");
        return error_mark_node;
       }
 
@@ -2573,7 +2573,7 @@ build_x_function_call (function, params, decl)
          /* Call via a pointer to member function.  */
          if (decl == NULL_TREE)
            {
-             cp_error (ec_pointer_to_member_function_called_but_not_in_class_scope);
+             error ("pointer to member function called, but not in class scope");
              return error_mark_node;
            }
          /* What other type of POINTER_TYPE could this be? */
@@ -2597,7 +2597,7 @@ build_x_function_call (function, params, decl)
        {
          if (current_class_type == NULL_TREE)
            {
-             cp_error (ec_object_missing_in_call_to_method_s,
+             error ("object missing in call to method `%s'",
                     IDENTIFIER_POINTER (function));
              return error_mark_node;
            }
@@ -2629,7 +2629,7 @@ build_x_function_call (function, params, decl)
     {
       if (OVL_FUNCTION (function) == NULL_TREE)
        {
-         cp_error (ec_function_declared_overloaded_but_no_definitions_appear_with_which_to_resolve_it,
+         cp_error ("function `%D' declared overloaded, but no definitions appear with which to resolve it?!?",
                    TREE_PURPOSE (function));
          return error_mark_node;
        }
@@ -2709,9 +2709,9 @@ build_x_function_call (function, params, decl)
        {
          if (current_function_decl
              && DECL_STATIC_FUNCTION_P (current_function_decl))
-           cp_error (ec_invalid_call_to_member_function_needing_this_in_static_member_function_scope);
+           error ("invalid call to member function needing `this' in static member function scope");
          else
-           cp_error (ec_pointer_to_member_function_called_but_not_in_class_scope);
+           error ("pointer to member function called, but not in class scope");
          return error_mark_node;
        }
       if (TREE_CODE (TREE_TYPE (decl)) != POINTER_TYPE
@@ -2829,7 +2829,7 @@ get_member_function_from_ptrfunc (instance_ptrptr, function)
       if (instance_ptr == error_mark_node
          && TREE_CODE (e1) != ADDR_EXPR
          && TREE_CODE (TREE_OPERAND (e1, 0)) != FUNCTION_DECL)
-       cp_error (ec_object_missing_in, function);
+       cp_error ("object missing in `%E'", function);
 
       function = e1;
     }
@@ -2867,7 +2867,7 @@ build_function_call_real (function, params, require_complete, flags)
 
       /* Convert anything with function type to a pointer-to-function.  */
       if (pedantic && DECL_MAIN_P (function))
-       cp_pedwarn (ec_forbids_calling_main_from_within_program);
+       pedwarn ("ANSI C++ forbids calling `main' from within program");
 
       /* Differs from default_conversion by not setting TREE_ADDRESSABLE
         (because calling an inline function does not mean the function
@@ -2892,7 +2892,7 @@ build_function_call_real (function, params, require_complete, flags)
 
   if (TYPE_PTRMEMFUNC_P (fntype))
     {
-      cp_error (ec_must_use_or_to_call_pointertomember_function_in,
+      cp_error ("must use .* or ->* to call pointer-to-member function in `%E (...)'",
                function);
       return error_mark_node;
     }
@@ -2905,7 +2905,7 @@ build_function_call_real (function, params, require_complete, flags)
        || is_method
        || TREE_CODE (function) == TEMPLATE_ID_EXPR))
     {
-      cp_error (ec_cannot_be_used_as_a_function, function);
+      cp_error ("`%E' cannot be used as a function", function);
       return error_mark_node;
     }
 
@@ -3038,12 +3038,12 @@ convert_arguments (typelist, values, fndecl, flags)
        {
          if (fndecl)
            {
-             cp_error_at (ec_too_many_arguments_to_s, called_thing,
+             cp_error_at ("too many arguments to %s `%+D'", called_thing,
                           fndecl);
-             cp_error (ec_at_this_point_in_file);
+             error ("at this point in file");
            }
          else
-           cp_error (ec_too_many_arguments_to_function);
+           error ("too many arguments to function");
          /* In case anybody wants to know if this argument
             list is valid.  */
          if (result)
@@ -3063,10 +3063,10 @@ convert_arguments (typelist, values, fndecl, flags)
          if (TREE_CODE (val) == ADDR_EXPR)
            val = TREE_OPERAND (val, 0);
          if (really_overloaded_fn (val))
-           cp_error (ec_insufficient_type_information_to_resolve_address_of_overloaded_function,
+           cp_error ("insufficient type information to resolve address of overloaded function `%D'",
                      DECL_NAME (get_first_fn (val)));
          else
-           cp_error (ec_insufficient_type_information_in_parameter_list);
+           error ("insufficient type information in parameter list");
          val = integer_zero_node;
        }
       else if (TREE_CODE (val) == OFFSET_REF
@@ -3105,7 +3105,7 @@ convert_arguments (typelist, values, fndecl, flags)
 
          if (TYPE_SIZE (complete_type (type)) == 0)
            {
-             cp_error (ec_parameter_type_of_called_function_is_incomplete);
+             error ("parameter type of called function is incomplete");
              parmval = val;
            }
          else
@@ -3166,13 +3166,13 @@ convert_arguments (typelist, values, fndecl, flags)
        {
          if (fndecl)
            {
-             cp_error_at (ec_too_few_arguments, 
-                          called_thing,
-                          fndecl);
-             cp_error (ec_at_this_point_in_file);
+             char *buf = (char *)alloca (32 + strlen (called_thing));
+             sprintf (buf, "too few arguments to %s `%%#D'", called_thing);
+             cp_error_at (buf, fndecl);
+             error ("at this point in file");
            }
          else
-           cp_error (ec_too_few_arguments_to_function);
+           error ("too few arguments to function");
          return error_mark_list;
        }
     }
@@ -3245,7 +3245,7 @@ build_binary_op (code, arg1, arg2, convert_p)
    are done in the narrower type when that gives the same result).
    Constant folding is also done before the result is returned.
 
-   ERR_CODE is the code that determines what to say in error messages.
+   ERROR_CODE is the code that determines what to say in error messages.
    It is usually, but not always, the same as CODE.
 
    Note that the operands will never have enumeral types
@@ -3257,10 +3257,10 @@ build_binary_op (code, arg1, arg2, convert_p)
    multiple inheritance, and deal with pointer to member functions.  */
 
 tree
-build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
+build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
      enum tree_code code;
      tree orig_op0, orig_op1;
-     enum tree_code err_code;
+     enum tree_code error_code;
 {
   tree op0, op1;
   register enum tree_code code0, code1;
@@ -3380,9 +3380,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
              || code1 == COMPLEX_TYPE))
        {
          if (TREE_CODE (op1) == INTEGER_CST && integer_zerop (op1))
-           cp_warning (ec_division_by_zero_in_div, op0);
+           cp_warning ("division by zero in `%E / 0'", op0);
          else if (TREE_CODE (op1) == REAL_CST && real_zerop (op1))
-           cp_warning (ec_division_by_zero_in_div, op0);
+           cp_warning ("division by zero in `%E / 0.'", op0);
              
          if (!(code0 == INTEGER_TYPE && code1 == INTEGER_TYPE))
            resultcode = RDIV_EXPR;
@@ -3437,9 +3437,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
     case TRUNC_MOD_EXPR:
     case FLOOR_MOD_EXPR:
       if (code1 == INTEGER_TYPE && integer_zerop (op1))
-       cp_warning (ec_division_by_zero_in_mod, op0);
+       cp_warning ("division by zero in `%E %% 0'", op0);
       else if (code1 == REAL_TYPE && real_zerop (op1))
-       cp_warning (ec_division_by_zero_in_mod, op0);
+       cp_warning ("division by zero in `%E %% 0.'", op0);
       
       if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE)
        {
@@ -3474,7 +3474,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
          if (TREE_CODE (op1) == INTEGER_CST)
            {
              if (tree_int_cst_lt (op1, integer_zero_node))
-               cp_warning (ec_right_shift_count_is_negative);
+               warning ("right shift count is negative");
              else
                {
                  if (TREE_INT_CST_LOW (op1) | TREE_INT_CST_HIGH (op1))
@@ -3482,7 +3482,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
                  if (TREE_INT_CST_HIGH (op1) != 0
                      || ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (op1)
                          >= TYPE_PRECISION (type0)))
-                   cp_warning (ec_right_shift_count_width_of_type);
+                   warning ("right shift count >= width of type");
                }
            }
          /* Convert the shift-count to an integer, regardless of
@@ -3501,11 +3501,11 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
          if (TREE_CODE (op1) == INTEGER_CST)
            {
              if (tree_int_cst_lt (op1, integer_zero_node))
-               cp_warning (ec_left_shift_count_is_negative);
+               warning ("left shift count is negative");
              else if (TREE_INT_CST_HIGH (op1) != 0
                       || ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (op1)
                           >= TYPE_PRECISION (type0)))
-               cp_warning (ec_left_shift_count_width_of_type);
+               warning ("left shift count >= width of type");
            }
          /* Convert the shift-count to an integer, regardless of
             size of value being shifted.  */
@@ -3524,12 +3524,12 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
          if (TREE_CODE (op1) == INTEGER_CST)
            {
              if (tree_int_cst_lt (op1, integer_zero_node))
-               cp_warning (ec_s_rotate_count_is_negative,
+               warning ("%s rotate count is negative",
                         (code == LROTATE_EXPR) ? "left" : "right");
              else if (TREE_INT_CST_HIGH (op1) != 0
                       || ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (op1)
                           >= TYPE_PRECISION (type0)))
-               cp_warning (ec_s_rotate_count_width_of_type,
+               warning ("%s rotate count >= width of type",
                         (code == LROTATE_EXPR) ? "left" : "right");
            }
          /* Convert the shift-count to an integer, regardless of
@@ -3558,18 +3558,18 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
            {
              if (pedantic && TREE_CODE (tt1) == FUNCTION_TYPE
                  && tree_int_cst_lt (TYPE_SIZE (type0), TYPE_SIZE (type1)))
-               cp_pedwarn (ec_forbids_comparison_of_void_with_function_pointer);
+               pedwarn ("ANSI C++ forbids comparison of `void *' with function pointer");
              else if (TREE_CODE (tt1) == OFFSET_TYPE)
-               cp_pedwarn (ec_forbids_conversion_of_a_pointer_to_member_to_void);
+               pedwarn ("ANSI C++ forbids conversion of a pointer to member to `void *'");
            }
          else if (tt1 == void_type_node)
            {
              if (pedantic && TREE_CODE (tt0) == FUNCTION_TYPE
                  && tree_int_cst_lt (TYPE_SIZE (type1), TYPE_SIZE (type0)))
-               cp_pedwarn (ec_forbids_comparison_of_void_with_function_pointer);
+               pedwarn ("ANSI C++ forbids comparison of `void *' with function pointer");
            }
          else
-           cp_pedwarn (ec_comparison_of_distinct_pointer_types_and_lacks_a_cast,
+           cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast",
                        type0, type1);
 
          if (result_type == NULL_TREE)
@@ -3584,12 +3584,12 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
       else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
        {
          result_type = type0;
-         cp_error (ec_forbids_comparison_between_pointer_and_integer);
+         error ("ANSI C++ forbids comparison between pointer and integer");
        }
       else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
        {
          result_type = type1;
-         cp_error (ec_forbids_comparison_between_pointer_and_integer);
+         error ("ANSI C++ forbids comparison between pointer and integer");
        }
       else if (TYPE_PTRMEMFUNC_P (type0) && TREE_CODE (op1) == INTEGER_CST
               && integer_zerop (op1))
@@ -3705,7 +3705,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
            result_type = common_type (type0, type1);
          else
            {
-             cp_pedwarn (ec_comparison_of_distinct_pointer_types_and_lacks_a_cast,
+             cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast",
                          type0, type1);
              result_type = ptr_type_node;
            }
@@ -3726,7 +3726,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
            result_type = common_type (type0, type1);
          else
            {
-             cp_pedwarn (ec_comparison_of_distinct_pointer_types_and_lacks_a_cast,
+             cp_pedwarn ("comparison of distinct pointer types `%T' and `%T' lacks a cast",
                          type0, type1);
              result_type = ptr_type_node;
            }
@@ -3740,12 +3740,12 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
       else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
        {
          result_type = type0;
-         cp_pedwarn (ec_forbids_comparison_between_pointer_and_integer);
+         pedwarn ("ANSI C++ forbids comparison between pointer and integer");
        }
       else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE)
        {
          result_type = type1;
-         cp_pedwarn (ec_forbids_comparison_between_pointer_and_integer);
+         pedwarn ("ANSI C++ forbids comparison between pointer and integer");
        }
       break;
 
@@ -3909,7 +3909,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
              && TYPE_MAIN_VARIANT (TREE_TYPE (orig_op0))
                 != TYPE_MAIN_VARIANT (TREE_TYPE (orig_op1)))
            {
-             cp_warning (ec_comparison_between_and
+             cp_warning ("comparison between `%#T' and `%#T'"
                          TREE_TYPE (orig_op0), TREE_TYPE (orig_op1));
            }
 
@@ -3946,7 +3946,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
                                                signed_type (result_type)))))
            /* OK */;
          else
-           cp_warning (ec_comparison_between_signed_and_unsigned);
+           warning ("comparison between signed and unsigned");
 
          /* Warn if two unsigned values are being compared in a size
             larger than their original size, and one (and only one) is the
@@ -3991,7 +3991,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
                    {
                      mask = (~ (HOST_WIDE_INT) 0) << bits;
                      if ((mask & constant) != mask)
-                       cp_warning (ec_comparison_of_promoted_unsigned_with_constant);
+                       warning ("comparison of promoted ~unsigned with constant");
                    }
                }
              else if (unsignedp0 && unsignedp1
@@ -3999,7 +3999,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
                           < TYPE_PRECISION (result_type))
                       && (TYPE_PRECISION (TREE_TYPE (primop1))
                           < TYPE_PRECISION (result_type)))
-               cp_warning (ec_comparison_of_promoted_unsigned_with_unsigned);
+               warning ("comparison of promoted ~unsigned with unsigned");
            }
        }
     }
@@ -4012,8 +4012,8 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
 
   if (!result_type)
     {
-      cp_error (ec_invalid_operands_and_to_binary,
-               TREE_TYPE (orig_op0), TREE_TYPE (orig_op1), err_code);
+      cp_error ("invalid operands `%T' and `%T' to binary `%O'",
+               TREE_TYPE (orig_op0), TREE_TYPE (orig_op1), error_code);
       return error_mark_node;
     }
 
@@ -4034,7 +4034,7 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, err_code)
        performed.  Note that pointer-difference and pointer-addition
        have already been handled above, and so we don't end up here in
        that case.  */
-    cp_warning (ec_used_in_arithmetic);
+    cp_warning ("NULL used in arithmetic");
 
   if (! converted)
     {
@@ -4083,25 +4083,25 @@ pointer_int_sum (resultcode, ptrop, intop)
   if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_using_pointer_of_type_void_in_arithmetic);
+       pedwarn ("ANSI C++ forbids using pointer of type `void *' in arithmetic");
       size_exp = integer_one_node;
     }
   else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_using_pointer_to_a_function_in_arithmetic);
+       pedwarn ("ANSI C++ forbids using pointer to a function in arithmetic");
       size_exp = integer_one_node;
     }
   else if (TREE_CODE (TREE_TYPE (result_type)) == METHOD_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_using_pointer_to_a_method_in_arithmetic);
+       pedwarn ("ANSI C++ forbids using pointer to a method in arithmetic");
       size_exp = integer_one_node;
     }
   else if (TREE_CODE (TREE_TYPE (result_type)) == OFFSET_TYPE)
     {
       if (pedantic || warn_pointer_arith)
-       cp_pedwarn (ec_forbids_using_pointer_to_a_member_in_arithmetic);
+       pedwarn ("ANSI C++ forbids using pointer to a member in arithmetic");
       size_exp = integer_one_node;
     }
   else
@@ -4175,13 +4175,13 @@ pointer_diff (op0, op1, ptrtype)
   if (pedantic || warn_pointer_arith)
     {
       if (TREE_CODE (target_type) == VOID_TYPE)
-       cp_pedwarn (ec_forbids_using_pointer_of_type_void_in_subtraction);
+       pedwarn ("ANSI C++ forbids using pointer of type `void *' in subtraction");
       if (TREE_CODE (target_type) == FUNCTION_TYPE)
-       cp_pedwarn (ec_forbids_using_pointer_to_a_function_in_subtraction);
+       pedwarn ("ANSI C++ forbids using pointer to a function in subtraction");
       if (TREE_CODE (target_type) == METHOD_TYPE)
-       cp_pedwarn (ec_forbids_using_pointer_to_a_method_in_subtraction);
+       pedwarn ("ANSI C++ forbids using pointer to a method in subtraction");
       if (TREE_CODE (target_type) == OFFSET_TYPE)
-       cp_pedwarn (ec_forbids_using_pointer_to_a_member_in_subtraction);
+       pedwarn ("ANSI C++ forbids using pointer to a member in subtraction");
     }
 
   /* First do the subtraction as integers;
@@ -4192,7 +4192,7 @@ pointer_diff (op0, op1, ptrtype)
 
   /* This generates an error if op1 is a pointer to an incomplete type.  */
   if (TYPE_SIZE (TREE_TYPE (TREE_TYPE (op1))) == 0)
-    cp_error (ec_arithmetic_on_pointer_to_an_incomplete_type);
+    error ("arithmetic on pointer to an incomplete type");
 
   op1 = ((TREE_CODE (target_type) == VOID_TYPE
          || TREE_CODE (target_type) == FUNCTION_TYPE
@@ -4294,7 +4294,7 @@ build_x_unary_op (code, xarg)
   if (code == ADDR_EXPR)
     {
       if (TREE_CODE (xarg) == TARGET_EXPR)
-       cp_warning (ec_taking_address_of_temporary);
+       warning ("taking address of temporary");
     }
 
   return build_unary_op (code, xarg, 0);
@@ -4477,7 +4477,7 @@ build_unary_op (code, xarg, noconvert)
 
        /* ARM $5.2.5 last annotation says this should be forbidden.  */
        if (TREE_CODE (argtype) == ENUMERAL_TYPE)
-         cp_pedwarn (ec_forbids_sing_an_enum,
+         pedwarn ("ANSI C++ forbids %sing an enum",
                   (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR)
                   ? "increment" : "decrement");
            
@@ -4487,14 +4487,14 @@ build_unary_op (code, xarg, noconvert)
          {
            enum tree_code tmp = TREE_CODE (TREE_TYPE (argtype));
            if (TYPE_SIZE (complete_type (TREE_TYPE (argtype))) == 0)
-             cp_error (ec_cannot_s_a_pointer_to_incomplete_type,
+             cp_error ("cannot %s a pointer to incomplete type `%T'",
                        ((code == PREINCREMENT_EXPR
                          || code == POSTINCREMENT_EXPR)
                         ? "increment" : "decrement"), TREE_TYPE (argtype));
            else if ((pedantic || warn_pointer_arith)
                     && (tmp == FUNCTION_TYPE || tmp == METHOD_TYPE
                         || tmp == VOID_TYPE || tmp == OFFSET_TYPE))
-             cp_pedwarn (ec_forbids_sing_a_pointer_of_type,
+             cp_pedwarn ("ANSI C++ forbids %sing a pointer of type `%T'",
                          ((code == PREINCREMENT_EXPR
                            || code == POSTINCREMENT_EXPR)
                           ? "increment" : "decrement"), argtype);
@@ -4519,7 +4519,7 @@ build_unary_op (code, xarg, noconvert)
            {
              tree incremented, modify, value, compound;
              if (! lvalue_p (arg) && pedantic)
-               cp_pedwarn (ec_cast_to_nonreference_type_used_as_lvalue);
+               pedwarn ("cast to non-reference type used as lvalue");
              arg = stabilize_reference (arg);
              if (code == PREINCREMENT_EXPR || code == PREDECREMENT_EXPR)
                value = arg;
@@ -4554,7 +4554,7 @@ build_unary_op (code, xarg, noconvert)
          {
            if (code == POSTDECREMENT_EXPR || code == PREDECREMENT_EXPR)
              {
-               cp_error (ec_invalid_use_of_on_bool_variable, arg);
+               cp_error ("invalid use of `--' on bool variable `%D'", arg);
                return error_mark_node;
              }
 #if 0
@@ -4599,7 +4599,7 @@ build_unary_op (code, xarg, noconvert)
        }
       else if (pedantic && DECL_MAIN_P (arg))
        /* ARM $3.4 */
-       cp_pedwarn (ec_taking_address_of_function_main);
+       pedwarn ("taking address of function `main'");
 
       /* Let &* cancel out to simplify resulting code.  */
       if (TREE_CODE (arg) == INDIRECT_REF)
@@ -4702,7 +4702,7 @@ build_unary_op (code, xarg, noconvert)
        case FIX_ROUND_EXPR:
        case FIX_CEIL_EXPR:
          if (! lvalue_p (arg) && pedantic)
-           cp_pedwarn (ec_taking_the_address_of_a_cast_to_nonreference_type);
+           pedwarn ("taking the address of a cast to non-reference type");
          break;
          
        default:
@@ -4859,7 +4859,7 @@ unary_complex_lvalue (code, arg)
       if (TREE_CODE (t) == FUNCTION_DECL)
        {
          if (DECL_DESTRUCTOR_P (t))
-           cp_error (ec_taking_address_of_destructor);
+           cp_error ("taking address of destructor");
          return build_unary_op (ADDR_EXPR, t, 0);
        }
       if (TREE_CODE (t) == VAR_DECL)
@@ -4956,7 +4956,7 @@ mark_addressable (exp)
        if (x == current_class_ptr)
          {
            if (! flag_this_is_variable)
-             cp_error (ec_address_of_this_not_available);
+             error ("address of `this' not available");
            TREE_ADDRESSABLE (x) = 1; /* so compiler doesn't die later */
            put_var_into_stack (x);
            return 1;
@@ -4992,7 +4992,7 @@ mark_addressable (exp)
       case RESULT_DECL:
        if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
            && !DECL_ARTIFICIAL (x) && extra_warnings)
-         cp_warning (ec_address_requested_for_which_is_declared_register,
+         cp_warning ("address requested for `%D', which is declared `register'",
                      x);
        put_var_into_stack (x);
        TREE_ADDRESSABLE (x) = 1;
@@ -5054,7 +5054,7 @@ build_conditional_expr (ifexp, op1, op2)
   if (op1 == 0)
     {
       if (pedantic)
-       cp_pedwarn (ec_forbids_omitting_the_middle_term_of_a_expression);
+       pedwarn ("ANSI C++ forbids omitting the middle term of a ?: expression");
       ifexp = op1 = save_expr (ifexp);
     }
 
@@ -5141,18 +5141,18 @@ build_conditional_expr (ifexp, op1, op2)
     {
       if (code2 == ENUMERAL_TYPE)
        {
-         cp_error (ec_enumeral_mismatch_in_conditional_expression_vs,
+         cp_error ("enumeral mismatch in conditional expression: `%T' vs `%T'",
                    type1, type2);
          return error_mark_node;
        }
       else if (extra_warnings && ! IS_AGGR_TYPE_CODE (code2)
               && type2 != type_promotes_to (type1))
-       cp_warning (ec_enumeral_and_nonenumeral_type_in_conditional_expression);
+       warning ("enumeral and non-enumeral type in conditional expression");
     }
   else if (extra_warnings
           && code2 == ENUMERAL_TYPE && ! IS_AGGR_TYPE_CODE (code1)
           && type1 != type_promotes_to (type2))
-    cp_warning (ec_enumeral_and_nonenumeral_type_in_conditional_expression);
+    warning ("enumeral and non-enumeral type in conditional expression");
 
   if (code1 != VOID_TYPE)
     {
@@ -5203,7 +5203,7 @@ build_conditional_expr (ifexp, op1, op2)
   else if (code1 == VOID_TYPE || code2 == VOID_TYPE)
     {
       if (pedantic && (code1 != VOID_TYPE || code2 != VOID_TYPE))
-       cp_pedwarn (ec_forbids_conditional_expr_with_only_one_void_side);
+       pedwarn ("ANSI C++ forbids conditional expr with only one void side");
       result_type = void_type_node;
     }
   else if (code1 == POINTER_TYPE && null_ptr_cst_p (op2))
@@ -5217,13 +5217,13 @@ build_conditional_expr (ifexp, op1, op2)
       else if (TYPE_MAIN_VARIANT (TREE_TYPE (type1)) == void_type_node)
        {
          if (pedantic && TREE_CODE (type2) == FUNCTION_TYPE)
-           cp_pedwarn (ec_forbids_conditional_expr_between_void_and_function_pointer);
+           pedwarn ("ANSI C++ forbids conditional expr between `void *' and function pointer");
          result_type = qualify_type (type1, type2);
        }
       else if (TYPE_MAIN_VARIANT (TREE_TYPE (type2)) == void_type_node)
        {
          if (pedantic && TREE_CODE (type1) == FUNCTION_TYPE)
-           cp_pedwarn (ec_forbids_conditional_expr_between_void_and_function_pointer);
+           pedwarn ("ANSI C++ forbids conditional expr between `void *' and function pointer");
          result_type = qualify_type (type2, type1);
        }
       /* C++ */
@@ -5236,7 +5236,7 @@ build_conditional_expr (ifexp, op1, op2)
        {
          if (result_type == error_mark_node)
            {
-             cp_error (ec_common_base_type_of_types_and_is_ambiguous,
+             cp_error ("common base type of types `%T' and `%T' is ambiguous",
                        TREE_TYPE (type1), TREE_TYPE (type2));
              result_type = ptr_type_node;
            }
@@ -5245,7 +5245,7 @@ build_conditional_expr (ifexp, op1, op2)
              if (pedantic
                  && result_type != TREE_TYPE (type1)
                  && result_type != TREE_TYPE (type2))
-               cp_pedwarn (ec_and_converted_to_in_conditional_expression,
+               cp_pedwarn ("`%T' and `%T' converted to `%T *' in conditional expression",
                            type1, type2, result_type);
 
              result_type = build_pointer_type (result_type);
@@ -5253,18 +5253,18 @@ build_conditional_expr (ifexp, op1, op2)
        }
       else
        {
-         cp_pedwarn (ec_pointer_type_mismatch_in_conditional_expression);
+         pedwarn ("pointer type mismatch in conditional expression");
          result_type = ptr_type_node;
        }
     }
   else if (code1 == POINTER_TYPE && code2 == INTEGER_TYPE)
     {
-      cp_pedwarn (ec_pointerinteger_type_mismatch_in_conditional_expression);
+      pedwarn ("pointer/integer type mismatch in conditional expression");
       result_type = type1;
     }
   else if (code2 == POINTER_TYPE && code1 == INTEGER_TYPE)
     {
-      cp_pedwarn (ec_pointerinteger_type_mismatch_in_conditional_expression);
+      pedwarn ("pointer/integer type mismatch in conditional expression");
       result_type = type2;
     }
 
@@ -5274,7 +5274,7 @@ build_conditional_expr (ifexp, op1, op2)
         an aggregate value, try converting to a scalar type.  */
       if (code1 == RECORD_TYPE && code2 == RECORD_TYPE)
        {
-         cp_error (ec_aggregate_mismatch_in_conditional_expression_vs,
+         cp_error ("aggregate mismatch in conditional expression: `%T' vs `%T'",
                    type1, type2);
          return error_mark_node;
        }
@@ -5292,12 +5292,12 @@ build_conditional_expr (ifexp, op1, op2)
          tmp = build_type_conversion (CONVERT_EXPR, tmp, op1, 0);
          if (tmp == NULL_TREE)
            {
-             cp_error (ec_incompatible_types_and_in,
+             cp_error ("incompatible types `%T' and `%T' in `?:'",
                        type1, type2);
              return error_mark_node;
            }
          if (tmp == error_mark_node)
-           cp_error (ec_ambiguous_pointer_conversion);
+           error ("ambiguous pointer conversion");
          else
            STRIP_NOPS (tmp);
          result_type = common_type (type2, TREE_TYPE (tmp));
@@ -5315,12 +5315,12 @@ build_conditional_expr (ifexp, op1, op2)
          tmp = build_type_conversion (CONVERT_EXPR, tmp, op2, 0);
          if (tmp == NULL_TREE)
            {
-             cp_error (ec_incompatible_types_and_in,
+             cp_error ("incompatible types `%T' and `%T' in `?:'",
                        type1, type2);
              return error_mark_node;
            }
          if (tmp == error_mark_node)
-           cp_error (ec_ambiguous_pointer_conversion);
+           error ("ambiguous pointer conversion");
          else
            STRIP_NOPS (tmp);
          result_type = common_type (type1, TREE_TYPE (tmp));
@@ -5330,7 +5330,7 @@ build_conditional_expr (ifexp, op1, op2)
        result_type = void_type_node;
       else
        {
-         cp_error (ec_type_mismatch_in_conditional_expression);
+         error ("type mismatch in conditional expression");
          return error_mark_node;
        }
     }
@@ -5383,7 +5383,7 @@ build_x_compound_expr (list)
       if ((extra_warnings || warn_unused)
            && !(TREE_CODE (TREE_VALUE(list)) == CONVERT_EXPR
                 && TREE_TYPE (TREE_VALUE(list)) == void_type_node))
-        cp_warning (ec_lefthand_operand_of_comma_expression_has_no_effect);
+        warning("left-hand operand of comma expression has no effect");
     }
 #if 0 /* this requires a gcc backend patch to export warn_if_unused_value */
   else if (warn_unused)
@@ -5523,7 +5523,7 @@ build_static_cast (type, expr)
   if (ok)
     return build_c_cast (type, expr);
 
-  cp_error (ec_static_cast_from_to, intype, type);
+  cp_error ("static_cast from `%T' to `%T'", intype, type);
   return error_mark_node;
 }
 
@@ -5570,7 +5570,7 @@ build_reinterpret_cast (type, expr)
     {
       if (! real_lvalue_p (expr))
        {
-         cp_error (ec_reinterpret_cast_from_rvalue_to, intype, type);
+         cp_error ("reinterpret_cast from `%T' rvalue to `%T'", intype, type);
          return error_mark_node;
        }
       expr = build_unary_op (ADDR_EXPR, expr, 0);
@@ -5590,7 +5590,7 @@ build_reinterpret_cast (type, expr)
   else if (TREE_CODE (type) == INTEGER_TYPE && TYPE_PTR_P (intype))
     {
       if (TYPE_PRECISION (type) < TYPE_PRECISION (intype))
-       cp_pedwarn (ec_reinterpret_cast_from_to_loses_precision,
+       cp_pedwarn ("reinterpret_cast from `%T' to `%T' loses precision",
                    intype, type);
     }
   else if ((TYPE_PTRFN_P (type) && TYPE_PTRFN_P (intype))
@@ -5604,7 +5604,7 @@ build_reinterpret_cast (type, expr)
           || (TYPE_PTROBV_P (type) && TYPE_PTROBV_P (intype)))
     {
       if (! comp_ptr_ttypes_reinterpret (TREE_TYPE (type), TREE_TYPE (intype)))
-       cp_pedwarn (ec_reinterpret_cast_from_to_casts_away_const_or_volatile,
+       cp_pedwarn ("reinterpret_cast from `%T' to `%T' casts away const (or volatile)",
                    intype, type);
 
       if (TREE_READONLY_DECL_P (expr))
@@ -5614,14 +5614,14 @@ build_reinterpret_cast (type, expr)
   else if ((TYPE_PTRFN_P (type) && TYPE_PTROBV_P (intype))
           || (TYPE_PTRFN_P (type) && TYPE_PTROBV_P (intype)))
     {
-      cp_pedwarn (ec_forbids_casting_between_pointers_to_functions_and_objects);
+      pedwarn ("ANSI C++ forbids casting between pointers to functions and objects");
       if (TREE_READONLY_DECL_P (expr))
        expr = decl_constant_value (expr);
       return fold (build1 (NOP_EXPR, type, expr));
     }
   else
     {
-      cp_error (ec_reinterpret_cast_from_to, intype, type);
+      cp_error ("reinterpret_cast from `%T' to `%T'", intype, type);
       return error_mark_node;
     }
       
@@ -5673,7 +5673,7 @@ build_const_cast (type, expr)
     {
       if (! real_lvalue_p (expr))
        {
-         cp_error (ec_const_cast_from_rvalue_to, intype, type);
+         cp_error ("const_cast from `%T' rvalue to `%T'", intype, type);
          return error_mark_node;
        }
 
@@ -5689,7 +5689,7 @@ build_const_cast (type, expr)
           && comp_ptr_ttypes_const (TREE_TYPE (type), TREE_TYPE (intype)))
     return cp_convert (type, expr);
 
-  cp_error (ec_const_cast_from_to, intype, type);
+  cp_error ("const_cast from `%T' to `%T'", intype, type);
   return error_mark_node;
 }
 
@@ -5727,12 +5727,12 @@ build_c_cast (type, expr)
       if (TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE)
        {
          if (pedantic)
-           cp_pedwarn (ec_forbids_casting_to_an_array_type);
+           pedwarn ("ANSI C++ forbids casting to an array type");
          type = build_pointer_type (TREE_TYPE (type));
        }
       else
        {
-         cp_error (ec_forbids_casting_to_an_array_type);
+         error ("ANSI C++ forbids casting to an array type");
          return error_mark_node;
        }
     }
@@ -5740,13 +5740,13 @@ build_c_cast (type, expr)
   if (TREE_CODE (type) == FUNCTION_TYPE
       || TREE_CODE (type) == METHOD_TYPE)
     {
-      cp_error (ec_casting_to_function_type, type);
+      cp_error ("casting to function type `%T'", type);
       return error_mark_node;
     }
 
   if (IS_SIGNATURE (type))
     {
-      cp_error (ec_cast_specifies_signature_type);
+      error ("cast specifies signature type");
       return error_mark_node;
     }
 
@@ -5815,10 +5815,10 @@ build_c_cast (type, expr)
             softening them into pedwarns.  */
          if (TYPE_VOLATILE (TREE_TYPE (otype))
              && ! TYPE_VOLATILE (TREE_TYPE (type)))
-           cp_warning (ec_cast_discards_volatile_from_pointer_target_type);
+           warning ("cast discards `volatile' from pointer target type");
          if (TYPE_READONLY (TREE_TYPE (otype))
              && ! TYPE_READONLY (TREE_TYPE (type)))
-           cp_warning (ec_cast_discards_const_from_pointer_target_type);
+           warning ("cast discards `const' from pointer target type");
        }
 
       /* Warn about possible alignment problems.  */
@@ -5828,7 +5828,7 @@ build_c_cast (type, expr)
          && TREE_CODE (TREE_TYPE (otype)) != VOID_TYPE
          && TREE_CODE (TREE_TYPE (otype)) != FUNCTION_TYPE
          && TYPE_ALIGN (TREE_TYPE (type)) > TYPE_ALIGN (TREE_TYPE (otype)))
-       cp_warning (ec_cast_increases_required_alignment_of_target_type);
+       warning ("cast increases required alignment of target type");
 
 #if 0
       /* We should see about re-enabling these, they seem useful to
@@ -5836,7 +5836,7 @@ build_c_cast (type, expr)
       if (TREE_CODE (type) == INTEGER_TYPE
          && TREE_CODE (otype) == POINTER_TYPE
          && TYPE_PRECISION (type) != TYPE_PRECISION (otype))
-       cp_warning (ec_cast_from_pointer_to_integer_of_different_size);
+       warning ("cast from pointer to integer of different size");
 
       if (TREE_CODE (type) == POINTER_TYPE
          && TREE_CODE (otype) == INTEGER_TYPE
@@ -5844,7 +5844,7 @@ build_c_cast (type, expr)
          /* Don't warn about converting 0 to pointer,
             provided the 0 was explicit--not cast or made by folding.  */
          && !(TREE_CODE (value) == INTEGER_CST && integer_zerop (value)))
-       cp_warning (ec_cast_to_pointer_from_integer_of_different_size);
+       warning ("cast to pointer from integer of different size");
 #endif
 
       if (TREE_CODE (type) == REFERENCE_TYPE)
@@ -5983,7 +5983,7 @@ build_modify_expr (lhs, modifycode, rhs)
            lhs = member;
          else
            {
-             cp_compiler_error (ec_invalid_static_class_member);
+             compiler_error ("invalid static class member");
              return error_mark_node;
            }
        }
@@ -6042,7 +6042,7 @@ build_modify_expr (lhs, modifycode, rhs)
       newrhs = build_binary_op (modifycode, lhs, rhs, 1);
       if (newrhs == error_mark_node)
        {
-         cp_error (ec_in_evaluation_of, modifycode,
+         cp_error ("  in evaluation of `%Q(%#T, %#T)'", modifycode,
                    TREE_TYPE (lhs), TREE_TYPE (rhs));
          return error_mark_node;
        }
@@ -6076,7 +6076,7 @@ build_modify_expr (lhs, modifycode, rhs)
        /* WP 5.4.1:  The result is an lvalue if T is a reference type,
           otherwise the result is an rvalue.   */
        if (! lvalue_p (lhs))
-         cp_pedwarn (ec_forbids_cast_to_nonreference_type_used_as_lvalue);
+         pedwarn ("ANSI C++ forbids cast to non-reference type used as lvalue");
 
        result = build_modify_expr (inner_lhs, NOP_EXPR,
                                    cp_convert (TREE_TYPE (inner_lhs),
@@ -6143,7 +6143,7 @@ build_modify_expr (lhs, modifycode, rhs)
          && DECL_NAME (current_function_decl) != NULL_TREE
          && (DECL_NAME (current_function_decl)
              != constructor_name (current_class_type)))
-       cp_warning (ec_assignment_to_this_not_in_constructor_or_destructor);
+       warning ("assignment to `this' not in constructor or destructor");
       current_function_just_assigned_this = 1;
     }
 
@@ -6197,14 +6197,14 @@ build_modify_expr (lhs, modifycode, rhs)
       
       if (! comptypes (lhstype, TREE_TYPE (rhs), 0))
        {
-         cp_error (ec_incompatible_types_in_assignment_of_to,
+         cp_error ("incompatible types in assignment of `%T' to `%T'",
                    TREE_TYPE (rhs), lhstype);
          return error_mark_node;
        }
 
       /* Allow array assignment in compiler-generated code.  */
       if (pedantic && ! DECL_ARTIFICIAL (current_function_decl))
-       cp_pedwarn (ec_forbids_assignment_of_arrays);
+       pedwarn ("ANSI C++ forbids assignment of arrays");
 
       /* Have to wrap this in RTL_EXPR for two cases:
         in base or member initialization and if we
@@ -6241,7 +6241,7 @@ build_modify_expr (lhs, modifycode, rhs)
       if (lhs == DECL_RESULT (current_function_decl))
        {
          if (DECL_INITIAL (lhs))
-           cp_warning (ec_return_value_from_function_receives_multiple_initializations);
+           warning ("return value from function receives multiple initializations");
          DECL_INITIAL (lhs) = newrhs;
        }
     }
@@ -6388,7 +6388,7 @@ get_delta_difference (from, to, force)
   binfo = get_binfo (from, to, 1);
   if (binfo == error_mark_node)
     {
-      cp_error (ec_in_pointer_to_member_function_conversion);
+      error ("   in pointer to member function conversion");
       return delta;
     }
   if (binfo == 0)
@@ -6396,7 +6396,7 @@ get_delta_difference (from, to, force)
       if (!force)
        {
          error_not_base_type (from, to);
-         cp_error (ec_in_pointer_to_member_conversion);
+         error ("   in pointer to member conversion");
          return delta;
        }
       binfo = get_binfo (to, from, 1);
@@ -6406,9 +6406,9 @@ get_delta_difference (from, to, force)
        {
          binfo = binfo_member (BINFO_TYPE (binfo),
                                CLASSTYPE_VBASECLASSES (from));
-         cp_warning (ec_pointer_to_member_cast_to_virtual_base,
+         cp_warning ("pointer to member cast to virtual base `%T'",
                      BINFO_TYPE (binfo));
-         cp_warning (ec_will_only_work_if_you_are_very_careful);
+         warning ("  will only work if you are very careful");
        }
       delta = BINFO_OFFSET (binfo);
       delta = cp_convert (ptrdiff_type_node, delta);
@@ -6422,12 +6422,12 @@ get_delta_difference (from, to, force)
     {
       if (force)
        {
-         cp_warning (ec_pointer_to_member_cast_from_virtual_base,
+         cp_warning ("pointer to member cast from virtual base `%T'",
                      BINFO_TYPE (binfo));
-         cp_warning (ec_will_only_work_if_you_are_very_careful);
+         warning ("  will only work if you are very careful");
        }
       else
-       cp_error (ec_pointer_to_member_conversion_from_virtual_base,
+       cp_error ("pointer to member conversion from virtual base `%T'",
                  BINFO_TYPE (binfo));
     }
 
@@ -6543,7 +6543,7 @@ build_ptrmemfunc (type, pfn, force)
       pfn_type = TYPE_PTRMEMFUNC_FN_TYPE (TREE_TYPE (pfn));
       if (!force
          && comp_target_types (type, pfn_type, 1) != 1)
-       cp_error (ec_conversion_to_from, type, pfn_type);
+       cp_error ("conversion to `%T' from `%T'", type, pfn_type);
 
       ndelta = cp_convert (ptrdiff_type_node, build_component_ref (pfn, delta_identifier, NULL_TREE, 0));
       ndelta2 = cp_convert (ptrdiff_type_node, DELTA2_FROM_PTRMEMFUNC (pfn));
@@ -6585,7 +6585,7 @@ build_ptrmemfunc (type, pfn, force)
 
   if (!force 
       && comp_target_types (type, TREE_TYPE (pfn), 0) != 1)
-    cp_error (ec_conversion_to_from, type, TREE_TYPE (pfn));
+    cp_error ("conversion to `%T' from `%T'", type, TREE_TYPE (pfn));
 
   /* Allow pointer to member conversions here.  */
   delta = get_delta_difference (TYPE_METHOD_BASETYPE (TREE_TYPE (TREE_TYPE (pfn))),
@@ -6594,7 +6594,7 @@ build_ptrmemfunc (type, pfn, force)
   delta2 = build_binary_op (PLUS_EXPR, delta2, delta, 1);
 
   if (TREE_CODE (TREE_OPERAND (pfn, 0)) != FUNCTION_DECL)
-    cp_warning (ec_assuming_pointer_to_member_function_is_nonvirtual);
+    warning ("assuming pointer to member function is non-virtual");
 
   if (TREE_CODE (TREE_OPERAND (pfn, 0)) == FUNCTION_DECL
       && DECL_VINDEX (TREE_OPERAND (pfn, 0)))
@@ -6655,7 +6655,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
 
   /* Issue warnings about peculiar, but legal, uses of NULL.  */
   if (ARITHMETIC_TYPE_P (type) && rhs == null_node)
-    cp_warning (ec_converting_null_to_nonpointer_type);
+    cp_warning ("converting NULL to non-pointer type");
 
   if (coder == UNKNOWN_TYPE)
     rhs = instantiate_type (type, rhs, 1);
@@ -6712,7 +6712,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
 
   if (coder == VOID_TYPE)
     {
-      cp_error (ec_void_value_not_ignored_as_it_ought_to_be);
+      error ("void value not ignored as it ought to be");
       return error_mark_node;
     }
   /* Arithmetic types all interconvert.  */
@@ -6725,10 +6725,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
       if (coder == REAL_TYPE && codel == INTEGER_TYPE)
        {
          if (fndecl)
-           cp_warning (ec_used_for_argument_of,
+           cp_warning ("`%T' used for argument %P of `%D'",
                        rhstype, parmnum, fndecl);
          else
-           cp_warning (ec_s_to_from, errtype, type, rhstype);
+           cp_warning ("%s to `%T' from `%T'", errtype, type, rhstype);
        }
       /* And we should warn if assigning a negative value to
         an unsigned variable.  */
@@ -6738,10 +6738,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
              && TREE_NEGATED_INT (rhs))
            {
              if (fndecl)
-               cp_warning (ec_negative_value_passed_as_argument_of,
+               cp_warning ("negative value `%E' passed as argument %P of `%D'",
                            rhs, parmnum, fndecl);
              else
-               cp_warning (ec_s_of_negative_value_to,
+               cp_warning ("%s of negative value `%E' to `%T'",
                            errtype, rhs, type);
            }
          overflow_warning (rhs);
@@ -6799,19 +6799,19 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
          if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr))
            {
              if (fndecl)
-               cp_pedwarn (ec_passing_as_argument_of_discards_const,
+               cp_pedwarn ("passing `%T' as argument %P of `%D' discards const",
                            rhstype, parmnum, fndecl);
              else
-               cp_pedwarn (ec_s_to_from_discards_const,
+               cp_pedwarn ("%s to `%T' from `%T' discards const",
                            errtype, type, rhstype);
            }
          if (! TYPE_VOLATILE (ttl) && TYPE_VOLATILE (ttr))
            {
              if (fndecl)
-               cp_pedwarn (ec_passing_as_argument_of_discards_volatile,
+               cp_pedwarn ("passing `%T' as argument %P of `%D' discards volatile",
                            rhstype, parmnum, fndecl);
              else
-               cp_pedwarn (ec_s_to_from_discards_volatile,
+               cp_pedwarn ("%s to `%T' from `%T' discards volatile",
                            errtype, type, rhstype);
            }
        }
@@ -6829,12 +6829,12 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
          if (TYPE_MAIN_VARIANT (ttl) == void_type_node
              && TREE_CODE (ttr) == OFFSET_TYPE)
            {
-             cp_error (ec_no_standard_conversion_from_to_void, ttr);
+             cp_error ("no standard conversion from `%T' to `void *'", ttr);
              return error_mark_node;
            }
 
          if (ctt < 0 && TYPE_MAIN_VARIANT (ttl) != TYPE_MAIN_VARIANT (ttr))
-           cp_pedwarn (ec_converting_to_is_a_contravariance_violation,
+           cp_pedwarn ("converting `%T' to `%T' is a contravariance violation",
                        rhstype, type);
 
          if (TYPE_MAIN_VARIANT (ttl) != void_type_node
@@ -6842,10 +6842,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
              && ! null_ptr_cst_p (rhs))
            {
              if (coder == RECORD_TYPE)
-               cp_pedwarn (ec_implicit_conversion_of_signature_pointer_to_type,
+               cp_pedwarn ("implicit conversion of signature pointer to type `%T'",
                            type);
              else
-               cp_pedwarn (ec_forbids_implicit_conversion_from_void_in_s,
+               pedwarn ("ANSI C++ forbids implicit conversion from `void *' in %s",
                         errtype);
            }
          /* Const and volatile mean something different for function types,
@@ -6857,7 +6857,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
                  && binfo_member (TYPE_OFFSET_BASETYPE (ttr),
                                   CLASSTYPE_VBASECLASSES (TYPE_OFFSET_BASETYPE (ttl))))
                {
-                 cp_error (ec_s_between_pointer_to_members_converting_across_virtual_baseclasses, errtype);
+                 error ("%s between pointer to members converting across virtual baseclasses", errtype);
                  return error_mark_node;
                }
              else if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr))
@@ -6865,29 +6865,29 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
                  if (string_conv_p (type, rhs, 1))
                    /* converting from string constant to char *, OK.  */;
                  else if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_discards_const,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' discards const",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_discards_const,
+                   cp_pedwarn ("%s to `%T' from `%T' discards const",
                                errtype, type, rhstype);
                }
              else if (! TYPE_VOLATILE (ttl) && TYPE_VOLATILE (ttr))
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_discards_volatile,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' discards volatile",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_discards_volatile,
+                   cp_pedwarn ("%s to `%T' from `%T' discards volatile",
                                errtype, type, rhstype);
                }
              else if (TREE_CODE (ttl) == TREE_CODE (ttr)
                       && ! comp_target_types (type, rhstype, 1))
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_changes_signedness,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' changes signedness",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_changes_signedness,
+                   cp_pedwarn ("%s to `%T' from `%T' changes signedness",
                                errtype, type, rhstype);
                }
            }
@@ -6930,46 +6930,46 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
              if (add_quals)
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_adds_cvquals_without_intervening_const,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' adds cv-quals without intervening `const'",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_adds_cvquals_without_intervening_const,
+                   cp_pedwarn ("%s to `%T' from `%T' adds cv-quals without intervening `const'",
                                errtype, type, rhstype);
                }
              if (const_parity)
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_discards_const,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' discards const",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_discards_const,
+                   cp_pedwarn ("%s to `%T' from `%T' discards const",
                                errtype, type, rhstype);
                }
              if (volatile_parity)
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_discards_volatile,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' discards volatile",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_discards_volatile,
+                   cp_pedwarn ("%s to `%T' from `%T' discards volatile",
                                errtype, type, rhstype);
                }
              if (unsigned_parity > 0)
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_changes_signed_to_unsigned,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' changes signed to unsigned",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_changes_signed_to_unsigned,
+                   cp_pedwarn ("%s to `%T' from `%T' changes signed to unsigned",
                                errtype, type, rhstype);
                }
              else if (unsigned_parity < 0)
                {
                  if (fndecl)
-                   cp_pedwarn (ec_passing_as_argument_of_changes_unsigned_to_signed,
+                   cp_pedwarn ("passing `%T' as argument %P of `%D' changes unsigned to signed",
                                rhstype, parmnum, fndecl);
                  else
-                   cp_pedwarn (ec_s_to_from_changes_unsigned_to_signed,
+                   cp_pedwarn ("%s to `%T' from `%T' changes unsigned to signed",
                                errtype, type, rhstype);
                }
 
@@ -6979,17 +6979,17 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
                  || TREE_CODE (ttl) == METHOD_TYPE)
                if (! comptypes (ttl, ttr, 0))
                  {
-                   cp_warning (ec_conflicting_function_types_in_s, errtype);
-                   cp_warning (ec_t, type, rhstype);
+                   warning ("conflicting function types in %s:", errtype);
+                   cp_warning ("\t`%T' != `%T'", type, rhstype);
                  }
            }
          else
            {
              if (fndecl)
-               cp_error (ec_passing_as_argument_of,
+               cp_error ("passing `%T' as argument %P of `%D'",
                          rhstype, parmnum, fndecl);
              else
-               cp_error (ec_s_to_from, errtype, type, rhstype);
+               cp_error ("%s to `%T' from `%T'", errtype, type, rhstype);
              return error_mark_node;
            }
        }
@@ -7002,10 +7002,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
       if (! (TREE_CODE (rhs) == INTEGER_CST && integer_zerop (rhs)))
        {
          if (fndecl)
-           cp_pedwarn (ec_passing_to_argument_of_lacks_a_cast,
+           cp_pedwarn ("passing `%T' to argument %P of `%D' lacks a cast",
                        rhstype, parmnum, fndecl);
          else
-           cp_pedwarn (ec_s_to_from_lacks_a_cast,
+           cp_pedwarn ("%s to `%T' from `%T' lacks a cast",
                        errtype, type, rhstype);
        }
       return cp_convert (type, rhs);
@@ -7018,10 +7018,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
                       || IS_SIGNATURE_REFERENCE (rhstype)))))
     {
       if (fndecl)
-       cp_pedwarn (ec_passing_to_argument_of_lacks_a_cast,
+       cp_pedwarn ("passing `%T' to argument %P of `%D' lacks a cast",
                    rhstype, parmnum, fndecl);
       else
-       cp_pedwarn (ec_s_to_from_lacks_a_cast,
+       cp_pedwarn ("%s to `%T' from `%T' lacks a cast",
                    errtype, type, rhstype);
       return cp_convert (type, rhs);
     }
@@ -7048,10 +7048,10 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
                 : comp_target_types (ttl, ttr, 1));
 
       if (ctt < 0)
-       cp_pedwarn (ec_converting_to_is_a_contravariance_violation,
+       cp_pedwarn ("converting `%T' to `%T' is a contravariance violation",
                    ttr, ttl);
       else if (ctt == 0)
-       cp_error (ec_s_to_from, errtype, ttl, ttr);
+       cp_error ("%s to `%T' from `%T'", errtype, ttl, ttr);
 
       /* compatible pointer to member functions.  */
       return build_ptrmemfunc (ttl, rhs, 0);
@@ -7080,7 +7080,7 @@ convert_for_assignment (type, rhs, errtype, fndecl, parmnum)
           && TYPE_PTRMEMFUNC_P (TREE_TYPE (rhs)))
     return cp_convert (type, rhs);
 
-  cp_error (ec_s_to_from, errtype, type, rhstype);
+  cp_error ("%s to `%T' from `%T'", errtype, type, rhstype);
   return error_mark_node;
 }
 
@@ -7170,9 +7170,9 @@ convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum)
       if (fndecl)
        {
          if (warningcount > savew)
-           cp_warning_at (ec_in_passing_argument_of, parmnum, fndecl);
+           cp_warning_at ("in passing argument %P of `%+D'", parmnum, fndecl);
          else if (errorcount > savee)
-           cp_error_at (ec_in_passing_argument_of, parmnum, fndecl);
+           cp_error_at ("in passing argument %P of `%+D'", parmnum, fndecl);
        }
       return rhs;
     }      
@@ -7204,7 +7204,7 @@ convert_for_initialization (exp, type, rhs, flags, errtype, fndecl, parmnum)
         avoid duplicate warnings on code like `const int I = NULL;
         f(I);'.  */
       if (ARITHMETIC_TYPE_P (type) && rhs == null_node)
-       cp_warning (ec_converting_null_to_nonpointer_type);
+       cp_warning ("converting NULL to non-pointer type");
 
       if (TREE_READONLY_DECL_P (rhs))
        rhs = decl_constant_value (rhs);
@@ -7293,7 +7293,7 @@ c_expand_return (retval)
   tree valtype = TREE_TYPE (result);
 
   if (TREE_THIS_VOLATILE (current_function_decl))
-    cp_warning (ec_function_declared_noreturn_has_a_return_statement);
+    warning ("function declared `noreturn' has a `return' statement");
 
   if (retval == error_mark_node)
     {
@@ -7310,7 +7310,7 @@ c_expand_return (retval)
   if (dtor_label)
     {
       if (retval)
-       cp_error (ec_returning_a_value_from_a_destructor);
+       error ("returning a value from a destructor");
 
       /* Can't just return from a destructor.  */
       expand_goto (dtor_label);
@@ -7334,7 +7334,7 @@ c_expand_return (retval)
            {
              if (DECL_NAME (DECL_RESULT (current_function_decl)) == NULL_TREE)
                {
-                 cp_pedwarn (ec_return_with_no_value_in_function_returning_nonvoid);
+                 pedwarn ("`return' with no value, in function returning non-void");
                  /* Clear this, so finish_function won't say that we
                     reach the end of a non-void function (which we don't,
                     we gave a return!).  */
@@ -7349,9 +7349,9 @@ c_expand_return (retval)
   else if (DECL_CONSTRUCTOR_P (current_function_decl))
     {
       if (flag_this_is_variable)
-       cp_error (ec_return_from_a_constructor_use_this_instead);
+       error ("return from a constructor: use `this = ...' instead");
       else
-       cp_error (ec_returning_a_value_from_a_constructor);
+       error ("returning a value from a constructor");
       retval = current_class_ptr;
     }
 
@@ -7359,13 +7359,13 @@ c_expand_return (retval)
   if (warn_ecpp
       && DECL_NAME (current_function_decl) == ansi_opname[(int) MODIFY_EXPR]
       && retval != current_class_ref)
-    cp_warning (ec_operator_should_return_a_reference_to_this);
+    cp_warning ("`operator=' should return a reference to `*this'");
 
   if (valtype == NULL_TREE || TREE_CODE (valtype) == VOID_TYPE)
     {
       current_function_returns_null = 1;
       if (TREE_CODE (TREE_TYPE (retval)) != VOID_TYPE)
-       cp_pedwarn (ec_return_with_a_value_in_function_returning_void);
+       pedwarn ("`return' with a value, in function returning void");
       expand_return (retval);
       return;
     }
@@ -7383,7 +7383,7 @@ c_expand_return (retval)
     /* It's already done for us.  */;
   else if (TREE_TYPE (retval) == void_type_node)
     {
-      cp_pedwarn (ec_return_of_void_value_in_function_returning_nonvoid);
+      pedwarn ("return of void value in function returning non-void");
       expand_expr_stmt (retval);
       retval = 0;
     }
@@ -7440,19 +7440,19 @@ c_expand_return (retval)
                {
                  /* Get the target.  */
                  whats_returned = TREE_OPERAND (whats_returned, 0);
-                 cp_warning (ec_returning_reference_to_temporary);
+                 warning ("returning reference to temporary");
                }
            }
 
          if (TREE_CODE (whats_returned) == VAR_DECL && DECL_NAME (whats_returned))
            {
              if (TEMP_NAME_P (DECL_NAME (whats_returned)))
-               cp_warning (ec_reference_to_nonlvalue_returned);
+               warning ("reference to non-lvalue returned");
              else if (TREE_CODE (TREE_TYPE (whats_returned)) != REFERENCE_TYPE
                       && ! TREE_STATIC (whats_returned)
                       && IDENTIFIER_LOCAL_VALUE (DECL_NAME (whats_returned))
                       && !TREE_PUBLIC (whats_returned))
-               cp_warning_at (ec_reference_to_local_variable_returned, whats_returned);
+               cp_warning_at ("reference to local variable `%D' returned", whats_returned);
            }
        }
       else if (TREE_CODE (retval) == ADDR_EXPR)
@@ -7464,7 +7464,7 @@ c_expand_return (retval)
              && IDENTIFIER_LOCAL_VALUE (DECL_NAME (whats_returned))
              && !TREE_STATIC (whats_returned)
              && !TREE_PUBLIC (whats_returned))
-           cp_warning_at (ec_address_of_local_variable_returned, whats_returned);
+           cp_warning_at ("address of local variable `%D' returned", whats_returned);
        }
     }
 
@@ -7514,7 +7514,7 @@ c_expand_start_case (exp)
 
   if (exp == NULL_TREE)
     {
-      cp_error (ec_switch_quantity_not_an_integer);
+      error ("switch quantity not an integer");
       exp = error_mark_node;
     }
   type = TREE_TYPE (exp);
@@ -7522,7 +7522,7 @@ c_expand_start_case (exp)
 
   if (code != INTEGER_TYPE && code != ENUMERAL_TYPE && code != ERROR_MARK)
     {
-      cp_error (ec_switch_quantity_not_an_integer);
+      error ("switch quantity not an integer");
       exp = error_mark_node;
     }
   else
index 52f791ed5f704a7f4f411de540ef61ecf70e60b6..265b387fd232585367ea4951b7c164018e250b14 100644 (file)
@@ -51,7 +51,7 @@ error_not_base_type (basetype, type)
 {
   if (TREE_CODE (basetype) == FUNCTION_DECL)
     basetype = DECL_CLASS_CONTEXT (basetype);
-  cp_error (ec_type_is_not_a_base_type_for_type, basetype, type);
+  cp_error ("type `%T' is not a base type for type `%T'", basetype, type);
   return error_mark_node;
 }
 
@@ -83,7 +83,7 @@ readonly_error (arg, string, soft)
      char *string;
      int soft;
 {
-  error_code ec;
+  char *fmt;
   void (*fn)();
 
   if (soft)
@@ -94,32 +94,32 @@ readonly_error (arg, string, soft)
   if (TREE_CODE (arg) == COMPONENT_REF)
     {
       if (TYPE_READONLY (TREE_TYPE (TREE_OPERAND (arg, 0))))
-       ec = ec_member_in_readonly_structure;
+        fmt = "%s of member `%D' in read-only structure";
       else
-       ec = ec_readonly_member;
-      (*fn) (ec, string, TREE_OPERAND (arg, 1));
+        fmt = "%s of read-only member `%D'";
+      (*fn) (fmt, string, TREE_OPERAND (arg, 1));
     }
   else if (TREE_CODE (arg) == VAR_DECL)
     {
       if (DECL_LANG_SPECIFIC (arg)
          && DECL_IN_AGGR_P (arg)
          && !TREE_STATIC (arg))
-       ec = ec_constant_field;
+       fmt = "%s of constant field `%D'";
       else
-       ec = ec_readonly_variable;
-      (*fn) (ec, string, arg);
+       fmt = "%s of read-only variable `%D'";
+      (*fn) (fmt, string, arg);
     }
   else if (TREE_CODE (arg) == PARM_DECL)
-    (*fn) (ec_readonly_parameter, string, arg);
+    (*fn) ("%s of read-only parameter `%D'", string, arg);
   else if (TREE_CODE (arg) == INDIRECT_REF
            && TREE_CODE (TREE_TYPE (TREE_OPERAND (arg, 0))) == REFERENCE_TYPE
            && (TREE_CODE (TREE_OPERAND (arg, 0)) == VAR_DECL
                || TREE_CODE (TREE_OPERAND (arg, 0)) == PARM_DECL))
-    (*fn) (ec_readonly_reference, string, TREE_OPERAND (arg, 0));
+    (*fn) ("%s of read-only reference `%D'", string, TREE_OPERAND (arg, 0));
   else if (TREE_CODE (arg) == RESULT_DECL)
-    (*fn) (ec_readonly_named_return_val, string, arg);
+    (*fn) ("%s of read-only named return value `%D'", string, arg);
   else        
-    (*fn) (ec_readonly_location, string);
+    (*fn) ("%s of read-only location", string);
 }
 
 /* Print an error message for invalid use of a type which declares
@@ -161,22 +161,22 @@ abstract_virtuals_error (decl, type)
        return;
 
       if (TREE_CODE (decl) == VAR_DECL)
-       cp_error (ec_cannot_declare_variable_to_be_of_type,
+       cp_error ("cannot declare variable `%D' to be of type `%T'",
                    decl, type);
       else if (TREE_CODE (decl) == PARM_DECL)
-       cp_error (ec_cannot_declare_parameter_to_be_of_type,
+       cp_error ("cannot declare parameter `%D' to be of type `%T'",
                    decl, type);
       else if (TREE_CODE (decl) == FIELD_DECL)
-       cp_error (ec_cannot_declare_field_to_be_of_type,
+       cp_error ("cannot declare field `%D' to be of type `%T'",
                    decl, type);
       else if (TREE_CODE (decl) == FUNCTION_DECL
               && TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE)
-       cp_error (ec_invalid_return_type_for_method, decl);
+       cp_error ("invalid return type for method `%#D'", decl);
       else if (TREE_CODE (decl) == FUNCTION_DECL)
-       cp_error (ec_invalid_return_type_for_function, decl);
+       cp_error ("invalid return type for function `%#D'", decl);
     }
   else
-    cp_error (ec_cannot_allocate_an_object_of_type, type);
+    cp_error ("cannot allocate an object of type `%T'", type);
 
   /* Only go through this once.  */
   if (TREE_PURPOSE (u) == NULL_TREE)
@@ -184,28 +184,28 @@ abstract_virtuals_error (decl, type)
       TREE_PURPOSE (u) = error_mark_node;
 
       if (has_abstract_virtuals)
-       cp_error (ec_since_the_following_virtual_functions_are_abstract);
+       error ("  since the following virtual functions are abstract:");
       tu = u;
       while (tu)
        {
          if (DECL_ABSTRACT_VIRTUAL_P (TREE_VALUE (tu))
              && ! DECL_NEEDS_FINAL_OVERRIDER_P (TREE_VALUE (tu)))
-           cp_error (ec_virtual, TREE_VALUE (tu));
+           cp_error ("\t%#D", TREE_VALUE (tu));
          tu = TREE_CHAIN (tu);
        }
 
       if (needs_final_overriders)
        {
          if (has_abstract_virtuals)
-           cp_error (ec_and_the_following_virtual_functions_need_a_final_overrider);
+           error ("  and the following virtual functions need a final overrider:");
          else
-           cp_error (ec_since_the_following_virtual_functions_need_a_final_overrider);
+           error ("  since the following virtual functions need a final overrider:");
        }
       tu = u;
       while (tu)
        {
          if (DECL_NEEDS_FINAL_OVERRIDER_P (TREE_VALUE (tu)))
-           cp_error (ec_virtual, TREE_VALUE (tu));
+           cp_error ("\t%#D", TREE_VALUE (tu));
          tu = TREE_CHAIN (tu);
        }
     }
@@ -214,12 +214,12 @@ abstract_virtuals_error (decl, type)
       if (has_abstract_virtuals)
        {
          if (needs_final_overriders)
-           cp_error (ec_since_type_has_abstract_virtual_functions_and_must_override_virtual_functions, type);
+           cp_error ("  since type `%T' has abstract virtual functions and must override virtual functions", type);
          else
-           cp_error (ec_since_type_has_abstract_virtual_functions, type);
+           cp_error ("  since type `%T' has abstract virtual functions", type);
        }
       else
-       cp_error (ec_since_type_must_override_virtual_functions, type);
+       cp_error ("  since type `%T' must override virtual functions", type);
     }
 }
 
@@ -238,22 +238,22 @@ signature_error (decl, type)
        return;
 
       if (TREE_CODE (decl) == VAR_DECL)
-       cp_error (ec_cannot_declare_variable_to_be_of_signature_type,
+       cp_error ("cannot declare variable `%D' to be of signature type `%T'",
                  decl, type);
       else if (TREE_CODE (decl) == PARM_DECL)
-       cp_error (ec_cannot_declare_parameter_to_be_of_signature_type,
+       cp_error ("cannot declare parameter `%D' to be of signature type `%T'",
                  decl, type);
       else if (TREE_CODE (decl) == FIELD_DECL)
-       cp_error (ec_cannot_declare_field_to_be_of_signature_type,
+       cp_error ("cannot declare field `%D' to be of signature type `%T'",
                  decl, type);
       else if (TREE_CODE (decl) == FUNCTION_DECL
               && TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE)
-       cp_error (ec_invalid_return_type_for_method, decl);
+       cp_error ("invalid return type for method `%#D'", decl);
       else if (TREE_CODE (decl) == FUNCTION_DECL)
-       cp_error (ec_invalid_return_type_for_function, decl);
+       cp_error ("invalid return type for function `%#D'", decl);
     }
   else
-    cp_error (ec_cannot_allocate_an_object_of_signature_type, type);
+    cp_error ("cannot allocate an object of signature type `%T'", type);
 }
 
 /* Print an error message for invalid use of an incomplete type.
@@ -265,13 +265,15 @@ incomplete_type_error (value, type)
      tree value;
      tree type;
 {
+  char *errmsg = 0;
+
   /* Avoid duplicate error message.  */
   if (TREE_CODE (type) == ERROR_MARK)
     return;
 
   if (value != 0 && (TREE_CODE (value) == VAR_DECL
                     || TREE_CODE (value) == PARM_DECL))
-    cp_error (ec_has_incomplete_type, value);
+    cp_error ("`%D' has incomplete type", value);
   else
     {
     retry:
@@ -282,11 +284,11 @@ incomplete_type_error (value, type)
        case RECORD_TYPE:
        case UNION_TYPE:
        case ENUMERAL_TYPE:
-         cp_error (ec_invalid_use_of_undefined_type, type);
-         return;
+         errmsg = "invalid use of undefined type `%#T'";
+         break;
 
        case VOID_TYPE:
-         cp_error (ec_invalid_use_of_void_expression);
+         error ("invalid use of void expression");
          return;
 
        case ARRAY_TYPE:
@@ -295,20 +297,22 @@ incomplete_type_error (value, type)
              type = TREE_TYPE (type);
              goto retry;
            }
-         cp_error (ec_invalid_use_of_array_with_unspecified_bounds);
+         error ("invalid use of array with unspecified bounds");
          return;
 
        case OFFSET_TYPE:
-         cp_error (ec_invalid_use_of_member_type_did_you_forget_the);
+         error ("invalid use of member type (did you forget the `&' ?)");
          return;
 
        case TEMPLATE_TYPE_PARM:
-         cp_error (ec_invalid_use_of_template_type_parameter);
+         error ("invalid use of template type parameter");
          return;
 
        default:
          my_friendly_abort (108);
        }
+
+      cp_error (errmsg, type);
     }
 }
 
@@ -382,16 +386,16 @@ my_friendly_abort (i)
          ack ("Please submit a full bug report to `egcs-bugs@cygnus.com'.");
        }
       else
-       cp_error (ec_confused_by_earlier_errors_bailing_out);
+       error ("confused by earlier errors, bailing out");
       
       exit (34);
     }
   ++abortcount;
 
   if (i == 0)
-    cp_error (ec_nternal_compiler_error);
+    error ("Internal compiler error.");
   else
-    cp_error (ec_nternal_compiler_error_d, i);
+    error ("Internal compiler error %d.", i);
 
   fatal ("Please submit a full bug report to `egcs-bugs@cygnus.com'.");
 }
@@ -592,13 +596,13 @@ store_init_value (decl, init)
       if (TREE_CODE (init) == TREE_LIST
          && IS_SIGNATURE (type))
        {
-         cp_error (ec_constructor_syntax_cannot_be_used_with_signature_type,
+         cp_error ("constructor syntax cannot be used with signature type `%T'",
                    type);
          init = error_mark_node;
        }
       else if (TREE_CODE (init) == TREE_LIST)
        {
-         cp_error (ec_constructor_syntax_used_but_no_constructor_declared_for_type, type);
+         cp_error ("constructor syntax used, but no constructor declared for type `%T'", type);
          init = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (init));
        }
 #if 0
@@ -608,25 +612,25 @@ store_init_value (decl, init)
 
          /* Check that we're really an aggregate as ARM 8.4.1 defines it.  */
          if (CLASSTYPE_N_BASECLASSES (type))
-           cp_error_at (ec_initializer_list_construction_invalid_for_derived_class_object, decl);
+           cp_error_at ("initializer list construction invalid for derived class object `%D'", decl);
          if (CLASSTYPE_VTBL_PTR (type))
-           cp_error_at (ec_initializer_list_construction_invalid_for_polymorphic_class_object, decl);
+           cp_error_at ("initializer list construction invalid for polymorphic class object `%D'", decl);
          if (TYPE_NEEDS_CONSTRUCTING (type))
            {
-             cp_error_at (ec_initializer_list_construction_invalid_for, decl);
-             cp_error (ec_due_to_the_presence_of_a_constructor);
+             cp_error_at ("initializer list construction invalid for `%D'", decl);
+             error ("due to the presence of a constructor");
            }
          for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
            if (TREE_PRIVATE (field) || TREE_PROTECTED (field))
              {
-               cp_error_at (ec_initializer_list_construction_invalid_for, decl);
-               cp_error_at (ec_due_to_nonpublic_access_of_member, field);
+               cp_error_at ("initializer list construction invalid for `%D'", decl);
+               cp_error_at ("due to non-public access of member `%D'", field);
              }
          for (field = TYPE_METHODS (type); field; field = TREE_CHAIN (field))
            if (TREE_PRIVATE (field) || TREE_PROTECTED (field))
              {
-               cp_error_at (ec_initializer_list_construction_invalid_for, decl);
-               cp_error_at (ec_due_to_nonpublic_access_of_member, field);
+               cp_error_at ("initializer list construction invalid for `%D'", decl);
+               cp_error_at ("due to non-public access of member `%D'", field);
              }
        }
 #endif
@@ -638,7 +642,7 @@ store_init_value (decl, init)
        {
          if (TREE_CHAIN (init))
            {
-             cp_warning (ec_comma_expression_used_to_initialize_return_value);
+             warning ("comma expression used to initialize return value");
              init = build_compound_expr (init);
            }
          else
@@ -654,7 +658,7 @@ store_init_value (decl, init)
       else if (TREE_CODE (init) == TREE_LIST
               && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE)
        {
-         cp_error (ec_cannot_initialize_arrays_using_this_syntax);
+         error ("cannot initialize arrays using this syntax");
          return NULL_TREE;
        }
       else
@@ -663,7 +667,7 @@ store_init_value (decl, init)
             
          if (TREE_CHAIN (init) != NULL_TREE)
            {
-             cp_pedwarn (ec_initializer_list_being_treated_as_compound_expression);
+             pedwarn ("initializer list being treated as compound expression");
              init = build_compound_expr (init);
            }
          else
@@ -716,7 +720,7 @@ store_init_value (decl, init)
                    || IS_SIGNATURE_REFERENCE (type))))
        {
          if (! TREE_CONSTANT (value) || ! TREE_STATIC (value))
-           cp_pedwarn (ec_forbids_nonconstant_aggregate_initializer_expressions);
+           pedwarn ("ANSI C++ forbids non-constant aggregate initializer expressions");
        }
     }
 #endif
@@ -784,7 +788,7 @@ digest_init (type, init, tail)
 
       if (TREE_CODE (init) == TREE_LIST)
        {
-         cp_error (ec_initializing_array_with_parameter_list);
+         error ("initializing array with parameter list");
          return error_mark_node;
        }
 
@@ -803,14 +807,14 @@ digest_init (type, init, tail)
               != char_type_node)
              && TYPE_PRECISION (typ1) == BITS_PER_UNIT)
            {
-             cp_error (ec_chararray_initialized_from_wide_string);
+             error ("char-array initialized from wide string");
              return error_mark_node;
            }
          if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (string)))
               == char_type_node)
              && TYPE_PRECISION (typ1) != BITS_PER_UNIT)
            {
-             cp_error (ec_intarray_initialized_from_nonwide_string);
+             error ("int-array initialized from non-wide string");
              return error_mark_node;
            }
 
@@ -826,7 +830,7 @@ digest_init (type, init, tail)
                 counted in the length of the constant, but in C++ this would
                 be invalid.  */
              if (size < TREE_STRING_LENGTH (string))
-               cp_pedwarn (ec_initializerstring_for_array_of_chars_is_too_long);
+               pedwarn ("initializer-string for array of chars is too long");
            }
          return string;
        }
@@ -846,17 +850,17 @@ digest_init (type, init, tail)
        {
          if (element == 0)
            {
-             cp_error (ec_initializer_for_scalar_variable_requires_one_element);
+             error ("initializer for scalar variable requires one element");
              return error_mark_node;
            }
          init = element;
        }
       while (TREE_CODE (init) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (init))
        {
-         cp_pedwarn (ec_braces_around_scalar_initializer_for, type);
+         cp_pedwarn ("braces around scalar initializer for `%T'", type);
          init = CONSTRUCTOR_ELTS (init);
          if (TREE_CHAIN (init))
-           cp_pedwarn (ec_ignoring_extra_initializers_for, type);
+           cp_pedwarn ("ignoring extra initializers for `%T'", type);
          init = TREE_VALUE (init);
        }
 
@@ -868,7 +872,7 @@ digest_init (type, init, tail)
 
   if (TYPE_SIZE (type) && ! TREE_CONSTANT (TYPE_SIZE (type)))
     {
-      cp_error (ec_variablesized_object_of_type_may_not_be_initialized,
+      cp_error ("variable-sized object of type `%T' may not be initialized",
                type);
       return error_mark_node;
     }
@@ -877,7 +881,7 @@ digest_init (type, init, tail)
     {
       if (raw_constructor && TYPE_NON_AGGREGATE_CLASS (type))
        {
-         cp_error (ec_subobject_of_type_must_be_initialized_by_constructor_not_by,
+         cp_error ("subobject of type `%T' must be initialized by constructor, not by `%E'",
                    type, init);
          return error_mark_node;
        }
@@ -904,7 +908,7 @@ digest_init (type, init, tail)
        }
     }
 
-  cp_error (ec_invalid_initializer);
+  error ("invalid initializer");
   return error_mark_node;
 }
 \f
@@ -942,7 +946,7 @@ process_init_constructor (type, init, elts)
   if (elts)
     {
       if (warn_missing_braces)
-       cp_warning (ec_aggregate_has_a_partly_bracketed_initializer);
+       warning ("aggregate has a partly bracketed initializer");
       tail = *elts;
     }
   else
@@ -990,7 +994,7 @@ process_init_constructor (type, init, elts)
                                  || TREE_CODE (tail1) == TREE_LIST, 319);
              if (tail == tail1 && len < 0)
                {
-                 cp_error (ec_nonempty_initializer_for_array_of_empty_elements);
+                 error ("non-empty initializer for array of empty elements");
                  /* Just ignore what we were supposed to use.  */
                  tail1 = NULL_TREE;
                }
@@ -1097,19 +1101,19 @@ process_init_constructor (type, init, elts)
              members = expr_tree_cons (field, next1, members);
            }
          else if (TREE_READONLY (field))
-           cp_error (ec_uninitialized_const_member_s,
+           error ("uninitialized const member `%s'",
                   IDENTIFIER_POINTER (DECL_NAME (field)));
          else if (TYPE_LANG_SPECIFIC (TREE_TYPE (field))
                   && CLASSTYPE_READONLY_FIELDS_NEED_INIT (TREE_TYPE (field)))
-           cp_error (ec_member_s_with_uninitialized_const_fields,
+           error ("member `%s' with uninitialized const fields",
                   IDENTIFIER_POINTER (DECL_NAME (field)));
          else if (TREE_CODE (TREE_TYPE (field)) == REFERENCE_TYPE)
-           cp_error (ec_member_s_is_uninitialized_reference,
+           error ("member `%s' is uninitialized reference",
                   IDENTIFIER_POINTER (DECL_NAME (field)));
          /* Warn when some struct elements are implicitly initialized
              to zero.  */
          else if (extra_warnings)
-           cp_warning (ec_missing_initializer_for_member_s,
+           warning ("missing initializer for member `%s'",
                     IDENTIFIER_POINTER (DECL_NAME (field)));
        }
     }
@@ -1134,7 +1138,7 @@ process_init_constructor (type, init, elts)
            /* Handle the case of a call by build_c_cast.  */
            field = TREE_PURPOSE (tail), win = 1;
          else if (TREE_CODE (TREE_PURPOSE (tail)) != IDENTIFIER_NODE)
-           cp_error (ec_index_value_instead_of_field_name_in_union_initializer);
+           error ("index value instead of field name in union initializer");
          else
            {
              tree temp;
@@ -1146,7 +1150,7 @@ process_init_constructor (type, init, elts)
              if (temp)
                field = temp, win = 1;
              else
-               cp_error (ec_no_field_s_in_union_being_initialized,
+               error ("no field `%s' in union being initialized",
                       IDENTIFIER_POINTER (TREE_PURPOSE (tail)));
            }
          if (!win)
@@ -1154,7 +1158,7 @@ process_init_constructor (type, init, elts)
        }
       else if (field == 0)
        {
-         cp_error (ec_union_with_no_named_members_cannot_be_initialized,
+         cp_error ("union `%T' with no named members cannot be initialized",
                    type);
          TREE_VALUE (tail) = error_mark_node;
        }
@@ -1190,7 +1194,7 @@ process_init_constructor (type, init, elts)
   /* If arguments were specified as a constructor,
      complain unless we used all the elements of the constructor.  */
   else if (tail)
-    cp_pedwarn (ec_excess_elements_in_aggregate_initializer);
+    pedwarn ("excess elements in aggregate initializer");
 
   if (erroneous)
     return error_mark_node;
@@ -1317,7 +1321,7 @@ build_x_arrow (datum)
 
          if (value_member (TREE_TYPE (rval), types_memoized))
            {
-             cp_error (ec_circular_pointer_delegation_detected);
+             error ("circular pointer delegation detected");
              return error_mark_node;
            }
          else
@@ -1330,7 +1334,7 @@ build_x_arrow (datum)
 
       if (last_rval == NULL_TREE)
        {
-         cp_error (ec_base_operand_of_has_nonpointer_type, type);
+         cp_error ("base operand of `->' has non-pointer type `%T'", type);
          return error_mark_node;
        }
 
@@ -1349,9 +1353,9 @@ build_x_arrow (datum)
     return build_indirect_ref (last_rval, NULL_PTR);
 
   if (types_memoized)
-    cp_error (ec_result_of_operator_yields_nonpointer_result);
+    error ("result of `operator->()' yields non-pointer result");
   else
-    cp_error (ec_base_operand_of_is_not_a_pointer);
+    error ("base operand of `->' is not a pointer");
   return error_mark_node;
 }
 
@@ -1396,7 +1400,7 @@ build_m_component_ref (datum, component)
 
   if (TREE_CODE (type) != OFFSET_TYPE && TREE_CODE (type) != METHOD_TYPE)
     {
-      cp_error (ec_cannot_be_used_as_a_member_pointer_since_it_is_of_type, component, type);
+      cp_error ("`%E' cannot be used as a member pointer, since it is of type `%T'", component, type);
       return error_mark_node;
     }
 
@@ -1406,15 +1410,15 @@ build_m_component_ref (datum, component)
 
   if (! IS_AGGR_TYPE (objtype))
     {
-      cp_error (ec_cannot_apply_member_pointer_to, component, datum);
-      cp_error (ec_which_is_of_nonaggregate_type, objtype);
+      cp_error ("cannot apply member pointer `%E' to `%E'", component, datum);
+      cp_error ("which is of non-aggregate type `%T'", objtype);
       return error_mark_node;
     }
 
   binfo = get_binfo (TYPE_METHOD_BASETYPE (type), objtype, 1);
   if (binfo == NULL_TREE)
     {
-      cp_error (ec_member_type_incompatible_with_object_type,
+      cp_error ("member type `%T::' incompatible with object type `%T'",
                TYPE_METHOD_BASETYPE (type), objtype);
       return error_mark_node;
     }
@@ -1451,7 +1455,7 @@ build_functional_cast (exp, parms)
          type = lookup_name (exp, 1);
          if (!type || TREE_CODE (type) != TYPE_DECL)
            {
-             cp_error (ec_fails_to_be_a_typedef_or_builtin_type, exp);
+             cp_error ("`%T' fails to be a typedef or built-in type", exp);
              return error_mark_node;
            }
          type = TREE_TYPE (type);
@@ -1467,7 +1471,7 @@ build_functional_cast (exp, parms)
 
   if (IS_SIGNATURE (type))
     {
-      cp_error (ec_signature_type_not_allowed_in_cast_or_constructor_expression);
+      error ("signature type not allowed in cast or constructor expression");
       return error_mark_node;
     }
 
@@ -1479,7 +1483,7 @@ build_functional_cast (exp, parms)
       else
        {
          if (TREE_CHAIN (parms) != NULL_TREE)
-           cp_pedwarn (ec_initializer_list_being_treated_as_compound_expression);
+           pedwarn ("initializer list being treated as compound expression");
          parms = build_compound_expr (parms);
        }
 
@@ -1495,7 +1499,7 @@ build_functional_cast (exp, parms)
 
   if (TYPE_SIZE (complete_type (type)) == NULL_TREE)
     {
-      cp_error (ec_type_is_not_yet_defined, type);
+      cp_error ("type `%T' is not yet defined", type);
       return error_mark_node;
     }
 
@@ -1564,15 +1568,15 @@ report_case_error (code, type, new_value, old_value)
   if (code == 1)
     {
       if (new_value)
-       cp_error (ec_case_label_not_within_a_switch_statement);
+       error ("case label not within a switch statement");
       else
-       cp_error (ec_default_label_not_within_a_switch_statement);
+       error ("default label not within a switch statement");
     }
   else if (code == 2)
     {
       if (new_value == 0)
        {
-         cp_error (ec_multiple_default_labels_in_one_switch);
+         error ("multiple default labels in one switch");
          return;
        }
       if (TREE_CODE (new_value) == RANGE_EXPR)
@@ -1626,29 +1630,29 @@ report_case_error (code, type, new_value, old_value)
       else
        {
          if (TREE_CODE (type) == ENUMERAL_TYPE)
-           cp_error (ec_duplicate_label_s_in_switch_statement,
+           error ("duplicate label `%s' in switch statement",
                   enum_name_string (new_value, type));
          else
-           cp_error (ec_duplicate_label_d_in_switch_statement,
+           error ("duplicate label (%d) in switch statement",
                   TREE_INT_CST_LOW (new_value));
        }
     }
   else if (code == 3)
     {
       if (TREE_CODE (type) == ENUMERAL_TYPE)
-       cp_warning (ec_case_value_out_of_range_for_enum_s,
+       warning ("case value out of range for enum %s",
                 TYPE_NAME_STRING (type));
       else
-       cp_warning (ec_case_value_out_of_range);
+       warning ("case value out of range");
     }
   else if (code == 4)
     {
       if (TREE_CODE (type) == ENUMERAL_TYPE)
-       cp_error (ec_range_values_s_and_s_reversed,
+       error ("range values `%s' and `%s' reversed",
               enum_name_string (new_value, type),
               enum_name_string (old_value, type));
       else
-       cp_error (ec_range_values_reversed);
+       error ("range values reversed");
     }
 }
 #endif
@@ -1659,5 +1663,5 @@ check_for_new_type (string, inptree)
      flagged_type_tree inptree;
 {
   if (pedantic && inptree.new_type_flag)
-    cp_pedwarn (ec_forbids_defining_types_within_s,string);
+    pedwarn ("ANSI C++ forbids defining types within %s",string);
 }
index dd4e5ae893a7c73d243c989806a2752d21db9bac..14915d6a8629d74d57f6c20171cb61810fa3a5aa 100644 (file)
@@ -832,7 +832,7 @@ open_xref_file(file)
 
   if (xref_file == NULL)
     {
-      cp_error (ec_ant_create_crossreference_file_s, xref_name);
+      error("Can't create cross-reference file `%s'", xref_name);
       doing_xref = 0;
     }
 }