diff options
author | Andrea Azzarone <azzaronea@gmail.com> | 2015-07-14 22:36:50 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2015-07-14 22:36:50 +0000 |
commit | 973590f32087d0b9d5330d9a14a066b18a4ca832 (patch) | |
tree | b13b30b435432b9fc866972d868777277357607b /gcc/cp | |
parent | 42e6ab74b67a18019e35e2f84f62a3b4747160c9 (diff) | |
download | gcc-973590f32087d0b9d5330d9a14a066b18a4ca832.zip gcc-973590f32087d0b9d5330d9a14a066b18a4ca832.tar.gz gcc-973590f32087d0b9d5330d9a14a066b18a4ca832.tar.bz2 |
re PR c++/65071 (ICE on valid, sizeof...() of template template parameter pack in return type)
/cp
2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
PR c++/65071
* parser.c (cp_parser_sizeof_pack): Also consider template template
parameters.
/testsuite
2015-07-14 Andrea Azzarone <azzaronea@gmail.com>
PR c++/65071
* g++.dg/cpp0x/vt-65071.C: New.
From-SVN: r225793
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 904fc76..ec50f75 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-07-14 Andrea Azzarone <azzaronea@gmail.com> + + PR c++/65071 + * parser.c (cp_parser_sizeof_pack): Also consider template template + parameters. + 2015-07-14 Jason Merrill <jason@redhat.com> * call.c (build_new_method_call_1): Call reshape_init. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index f4e1ee1..574ffba 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -24468,7 +24468,7 @@ cp_parser_sizeof_pack (cp_parser *parser) if (expr == error_mark_node) cp_parser_name_lookup_error (parser, name, expr, NLE_NULL, token->location); - if (TREE_CODE (expr) == TYPE_DECL) + if (TREE_CODE (expr) == TYPE_DECL || TREE_CODE (expr) == TEMPLATE_DECL) expr = TREE_TYPE (expr); else if (TREE_CODE (expr) == CONST_DECL) expr = DECL_INITIAL (expr); |