summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-06 14:43:07 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-06 14:43:07 +0000
commit02d3a327c95fd3eeaac76b7c002c0f890a2609bb (patch)
tree2900ac65d7fefff7c3bca1566e382f03671223a7
parentbdc4450d1aa523b8970ebba112055cd50fbd983d (diff)
downloadgcc-02d3a327c95fd3eeaac76b7c002c0f890a2609bb.tar.gz
/cp
2013-10-06 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56060 * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION. /testsuite 2013-10-06 Paolo Carlini <paolo.carlini@oracle.com> PR c++/56060 * g++.dg/cpp0x/variadic144.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203229 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic144.C15
4 files changed, 29 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 219f4154831..6f6d8368116 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56060
+ * pt.c (type_dependent_expression_p): Handle EXPR_PACK_EXPANSION.
+
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58560
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 59be037c82e..2828cc983b3 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -20403,6 +20403,10 @@ 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))
expression = BASELINK_FUNCTIONS (expression);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 20ffa47e90a..bc867655d7d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56060
+ * g++.dg/cpp0x/variadic144.C: New.
+
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58560
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic144.C b/gcc/testsuite/g++.dg/cpp0x/variadic144.C
new file mode 100644
index 00000000000..5d05d3d52bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic144.C
@@ -0,0 +1,15 @@
+// PR c++/56060
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct baz { };
+template<typename T> T bar();
+
+template<typename T, typename ... U>
+baz<decltype(bar<T>()(bar<U> ...))> // { dg-error "cannot be used" }
+foo();
+
+int main()
+{
+ foo<int>(); // { dg-error "no matching" }
+ return 0;
+}