From 303357a70540b27910f95aabdd880317ac8aa40e Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Wed, 8 Oct 2003 02:42:56 +0200 Subject: [PATCH] cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. * error.c (dump_function_decl): Use it to skip the dump of the arguments. (dump_expr): When dumping a declaration found within an expression, always set TFF_NO_FUNCTION_ARGUMENTS in the flags. From-SVN: r72215 --- gcc/cp/ChangeLog | 11 ++++++++++- gcc/cp/cp-tree.h | 4 +++- gcc/cp/error.c | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 80cc65e61fb2..e5955264af73 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,4 +1,13 @@ -2003-10-06 Giovanni Bajo +2003-10-08 Giovanni Bajo + + * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS. + * error.c (dump_function_decl): Use it to skip the dump of the + arguments. + (dump_expr): When dumping a declaration found within an + expression, always set TFF_NO_FUNCTION_ARGUMENTS + in the flags. + +2003-10-08 Giovanni Bajo PR c++/11097 * pt.c (tsubst_decl): Substitute also the DECL_NAME node of diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index eb6b6c2f81e6..f4582c37bdd8 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3432,7 +3432,8 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; TFF_TEMPLATE_HEADER: show the template<...> header in a template-declaration. TFF_TEMPLATE_NAME: show only template-name. - TFF_EXPR_IN_PARENS: Parenthesize expressions. */ + TFF_EXPR_IN_PARENS: parenthesize expressions. + TFF_NO_FUNCTION_ARGUMENTS: don't show function arguments. */ #define TFF_PLAIN_IDENTIFIER (0) #define TFF_SCOPE (1) @@ -3445,6 +3446,7 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, OP_FLAG, TYPENAME_FLAG }; #define TFF_TEMPLATE_HEADER (1 << 7) #define TFF_TEMPLATE_NAME (1 << 8) #define TFF_EXPR_IN_PARENS (1 << 9) +#define TFF_NO_FUNCTION_ARGUMENTS (1 << 10) /* Returns the TEMPLATE_DECL associated to a TEMPLATE_TEMPLATE_PARM node. */ diff --git a/gcc/cp/error.c b/gcc/cp/error.c index a10dcf6a8761..1c44324c6407 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -1082,7 +1082,7 @@ dump_function_decl (tree t, int flags) dump_function_name (t, flags); - if (1) + if (!(flags & TFF_NO_FUNCTION_ARGUMENTS)) { dump_parameters (parmtypes, flags); @@ -1302,7 +1302,7 @@ dump_expr (tree t, int flags) case NAMESPACE_DECL: case OVERLOAD: case IDENTIFIER_NODE: - dump_decl (t, flags & ~TFF_DECL_SPECIFIERS); + dump_decl (t, (flags & ~TFF_DECL_SPECIFIERS) | TFF_NO_FUNCTION_ARGUMENTS); break; case INTEGER_CST: