Commit 57c16a5e by Paolo Carlini Committed by Paolo Carlini

re PR c++/57092 (Using decltype of function pointer type to define a data member…

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
parent e1e14947
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
......
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
......
// PR c++/57092
// { dg-do compile { target c++11 } }
template <void (*F)(int)>
class B {
decltype(F) v;
};
void foo(int) {}
B<foo> o;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment