This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH: PR c++/10527


This patch turns off printing default argument expressions in our
error-handling routines.  That is almost always a mistake; our
expression-printing is not very good, and the user doesn't need the
information anyhow.

Tested on i686-pc-linux-gnu, applied on the mainline and (shortly) on
the branch.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2003-07-09  Mark Mitchell  <mark@codesourcery.com>

	PR c++/10527
	* error.c (decl_to_string): Do not print default argument
	expressions.

Index: cp/error.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
retrieving revision 1.220
diff -c -5 -p -r1.220 error.c
*** cp/error.c	9 Jul 2003 08:47:59 -0000	1.220
--- cp/error.c	10 Jul 2003 16:44:36 -0000
*************** decl_to_string (tree decl, int verbose)
*** 2167,2177 ****
  
    if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == RECORD_TYPE
        || TREE_CODE (decl) == UNION_TYPE || TREE_CODE (decl) == ENUMERAL_TYPE)
      flags = TFF_CLASS_KEY_OR_ENUM;
    if (verbose)
!     flags |= TFF_DECL_SPECIFIERS | TFF_FUNCTION_DEFAULT_ARGUMENTS;
    else if (TREE_CODE (decl) == FUNCTION_DECL)
      flags |= TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE;
    flags |= TFF_TEMPLATE_HEADER;
  
    reinit_global_formatting_buffer ();
--- 2167,2177 ----
  
    if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == RECORD_TYPE
        || TREE_CODE (decl) == UNION_TYPE || TREE_CODE (decl) == ENUMERAL_TYPE)
      flags = TFF_CLASS_KEY_OR_ENUM;
    if (verbose)
!     flags |= TFF_DECL_SPECIFIERS;
    else if (TREE_CODE (decl) == FUNCTION_DECL)
      flags |= TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE;
    flags |= TFF_TEMPLATE_HEADER;
  
    reinit_global_formatting_buffer ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]