summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-08 00:42:56 +0000
committerbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-08 00:42:56 +0000
commit3d2a7578ff571267f09a6da70e4e328d56487cec (patch)
tree9a7888a65a7359b7d83dddc8e7b81da51d6cd738 /gcc/cp
parenta32ed09687efd9aecc098a54e2cedce7073d7b92 (diff)
downloadgcc-3d2a7578ff571267f09a6da70e4e328d56487cec.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72215 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog11
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/error.c4
3 files changed, 15 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 80cc65e61fb..e5955264af7 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,13 @@
-2003-10-06 Giovanni Bajo <giovannibajo@libero.it>
+2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
+
+ * 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 <giovannibajo@libero.it>
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 eb6b6c2f81e..f4582c37bdd 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 a10dcf6a876..1c44324c640 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: