diff options
author | Giovanni Bajo <giovannibajo@libero.it> | 2003-10-08 02:42:56 +0200 |
---|---|---|
committer | Bernardo Innocenti <bernie@gcc.gnu.org> | 2003-10-08 02:42:56 +0200 |
commit | 303357a70540b27910f95aabdd880317ac8aa40e (patch) | |
tree | 9a7888a65a7359b7d83dddc8e7b81da51d6cd738 /gcc | |
parent | 605143d82ff60a94b738cf2bbd4caac23899572b (diff) | |
download | gcc-303357a70540b27910f95aabdd880317ac8aa40e.zip gcc-303357a70540b27910f95aabdd880317ac8aa40e.tar.gz gcc-303357a70540b27910f95aabdd880317ac8aa40e.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 4 | ||||
-rw-r--r-- | gcc/cp/error.c | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 80cc65e..e595526 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 eb6b6c2..f4582c3 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 a10dcf6..1c44324 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: |