Commit a651bcbe by Jason Merrill Committed by Jason Merrill

re PR c++/49298 ([C++0x] sorry, unimplemented: unexpected ast of kind field_decl)

	PR c++/49298
	* semantics.c (potential_constant_expression_1): Handle FIELD_DECL.

From-SVN: r174721
parent 4de4b0f2
2011-06-06 Jason Merrill <jason@redhat.com>
PR c++/49298
* semantics.c (potential_constant_expression_1): Handle FIELD_DECL.
PR objc++/49221
* decl.c (cp_finish_decl): Check DECL_FUNCTION_SCOPE_P rather than
at_function_scope_p.
......
......@@ -7489,6 +7489,8 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
case TEMPLATE_PARM_INDEX:
case TRAIT_EXPR:
case IDENTIFIER_NODE:
/* We can see a FIELD_DECL in a pointer-to-member expression. */
case FIELD_DECL:
return true;
case PARM_DECL:
......
2011-06-06 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/regress/ptrmem1.C: New.
2011-06-06 Richard Sandiford <rdsandiford@googlemail.com>
PR rtl-optimization/49145
......
// PR c++/49298
// { dg-options -std=c++0x }
template <class T, int T::*> struct B { };
template <class T> struct A
{
int i;
B<A,&A::i> b;
};
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