re PR c++/56060 (ICE on invalid code in type_dependent_expression_p, at cp/pt.c:19742)
/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. From-SVN: r203229
This commit is contained in:
parent
c3ddbdce59
commit
fef7e16b3f
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
15
gcc/testsuite/g++.dg/cpp0x/variadic144.C
Normal file
15
gcc/testsuite/g++.dg/cpp0x/variadic144.C
Normal file
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user