Commit 0eb35d46 by Jason Merrill Committed by Jason Merrill

re PR c++/46552 ([C++0x] Internal compiler error on pointer to member variable with template)

	PR c++/46552
	* semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF.

From-SVN: r169099
parent ff5f50c5
2011-01-21 Jason Merrill <jason@redhat.com>
PR c++/46552
* semantics.c (cxx_eval_constant_expression): Handle OFFSET_REF.
PR c++/46977
* semantics.c (potential_constant_expression_1): Split out from
potential_constant_expression. Add want_rval parm. Handle
......
......@@ -7024,6 +7024,7 @@ cxx_eval_constant_expression (const constexpr_call *call, tree t,
case NON_DEPENDENT_EXPR:
case BASELINK:
case EXPR_STMT:
case OFFSET_REF:
if (!allow_non_constant)
error_at (EXPR_LOC_OR_HERE (t),
"expression %qE is not a constant-expression", t);
......
2011-01-21 Jason Merrill <jason@redhat.com>
PR c++/46552
* g++.dg/cpp0x/constexpr-regress2.C: New.
* g++.dg/cpp0x/constexpr-stmtexpr.C: New.
2011-01-21 Jeff Law <law@redhat.com>
......
// PR c++/46552
// { dg-options -std=c++0x }
struct S
{
int x;
};
template < typename >
void f( void )
{
&S::x;
}
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