diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-09-28 15:10:13 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-09-28 15:10:13 +0000 |
commit | 31d400080bc8e7ee3b28716817edcb9087263278 (patch) | |
tree | a85e76a7b7e68234d774425a30df21879fc84ac8 /gcc/cp | |
parent | 4344da24b58f86c91bc839c1087cf2570ee0f276 (diff) | |
download | gcc-31d400080bc8e7ee3b28716817edcb9087263278.zip gcc-31d400080bc8e7ee3b28716817edcb9087263278.tar.gz gcc-31d400080bc8e7ee3b28716817edcb9087263278.tar.bz2 |
re PR c++/33118 (#'argument_pack_select' not supported by dump_expr#<expression error>)
2007-09-28 Paolo Carlini <pcarlini@suse.de>
PR c++/33118
* error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
(dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
(dump_parameters): Just call dump_type for argument packs too.
From-SVN: r128866
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/error.c | 33 |
2 files changed, 14 insertions, 26 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8c1d9e2..3e02375 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2007-09-28 Paolo Carlini <pcarlini@suse.de> + + PR c++/33118 + * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT. + (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK. + (dump_parameters): Just call dump_type for argument packs too. + 2007-09-27 Ollie Wild <aaw@google.com> * typeck2.c (digest_init): Call cplus_expand_constant after diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 4337d4d..feb6c31 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -396,16 +396,7 @@ dump_type (tree t, int flags) break; case TYPE_ARGUMENT_PACK: - { - tree args = ARGUMENT_PACK_ARGS (t); - int i; - for (i = 0; i < TREE_VEC_LENGTH (args); ++i) - { - if (i) - pp_separate_with_comma (cxx_pp); - dump_type (TREE_VEC_ELT (args, i), flags); - } - } + dump_template_argument (t, flags); break; case DECLTYPE_TYPE: @@ -1168,22 +1159,8 @@ dump_parameters (tree parmtypes, int flags) pp_cxx_identifier (cxx_pp, "..."); break; } - if (ARGUMENT_PACK_P (TREE_VALUE (parmtypes))) - { - tree types = ARGUMENT_PACK_ARGS (TREE_VALUE (parmtypes)); - int i, len = TREE_VEC_LENGTH (types); - first = 1; - for (i = 0; i < len; ++i) - { - if (!first) - pp_separate_with_comma (cxx_pp); - first = 0; - - dump_type (TREE_VEC_ELT (types, i), flags); - } - } - else - dump_type (TREE_VALUE (parmtypes), flags); + + dump_type (TREE_VALUE (parmtypes), flags); if ((flags & TFF_FUNCTION_DEFAULT_ARGUMENTS) && TREE_PURPOSE (parmtypes)) { @@ -2031,6 +2008,10 @@ dump_expr (tree t, int flags) pp_cxx_identifier (cxx_pp, "..."); break; + case ARGUMENT_PACK_SELECT: + dump_template_argument (ARGUMENT_PACK_SELECT_FROM_PACK (t), flags); + break; + case RECORD_TYPE: case UNION_TYPE: case ENUMERAL_TYPE: |