From 09c4fbed94853276b60cabb9769aa274b84475e1 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 5 Jun 2015 19:13:56 +0000 Subject: [PATCH] PR c++/66405 * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is dependent even if it has a type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224162 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/pt.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bb59bcc..e9a78b3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-06-05 Jason Merrill + + PR c++/66405 + * pt.c (type_dependent_expression_p): EXPR_PACK_EXPANSION is + dependent even if it has a type. + 2015-06-05 Aldy Hernandez * cp-objcp-common.c: Adjust comment for diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ec33d96..87b35fa 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -21442,6 +21442,10 @@ type_dependent_expression_p (tree expression) && variable_template_p (DECL_TI_TEMPLATE (expression))) return any_dependent_template_arguments_p (DECL_TI_ARGS (expression)); + /* Always dependent, on the number of arguments if nothing else. */ + if (TREE_CODE (expression) == EXPR_PACK_EXPANSION) + return true; + if (TREE_TYPE (expression) == unknown_type_node) { if (TREE_CODE (expression) == ADDR_EXPR) @@ -21459,10 +21463,6 @@ type_dependent_expression_p (tree expression) if (TREE_CODE (expression) == SCOPE_REF) return false; - /* Always dependent, on the number of arguments if nothing else. */ - if (TREE_CODE (expression) == EXPR_PACK_EXPANSION) - return true; - if (BASELINK_P (expression)) { if (BASELINK_OPTYPE (expression) -- 2.7.4