re PR c++/57092 (Using decltype of function pointer type to define a data member causes compiler crash)
/cp 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57092 * semantics.c (finish_decltype_type): Handle instantiated template non-type arguments. /testsuite 2013-05-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57092 * g++.dg/cpp0x/decltype53.C: New. From-SVN: r198487
This commit is contained in:
parent
e1e14947cf
commit
57c16a5eb6
@ -1,3 +1,9 @@
|
||||
2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/57092
|
||||
* semantics.c (finish_decltype_type): Handle instantiated template
|
||||
non-type arguments.
|
||||
|
||||
2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/56450
|
||||
|
@ -5416,8 +5416,9 @@ finish_decltype_type (tree expr, bool id_expression_or_member_access_p,
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
return error_mark_node;
|
||||
/* Handle instantiated template non-type arguments. */
|
||||
type = TREE_TYPE (expr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/57092
|
||||
* g++.dg/cpp0x/decltype53.C: New.
|
||||
|
||||
2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/57071
|
||||
|
11
gcc/testsuite/g++.dg/cpp0x/decltype53.C
Normal file
11
gcc/testsuite/g++.dg/cpp0x/decltype53.C
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/57092
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template <void (*F)(int)>
|
||||
class B {
|
||||
decltype(F) v;
|
||||
};
|
||||
|
||||
void foo(int) {}
|
||||
|
||||
B<foo> o;
|
Loading…
x
Reference in New Issue
Block a user