Commit cefb0898 by Jason Merrill Committed by Jason Merrill

semantics.c (potential_constant_expression_1): Don't crash on 'this' in NSDMI.

	* semantics.c (potential_constant_expression_1): Don't crash on
	'this' in NSDMI.

From-SVN: r198154
parent 08afbd3b
2013-04-22 Jason Merrill <jason@redhat.com>
* semantics.c (potential_constant_expression_1): Don't crash on
'this' in NSDMI.
Core 1612
* semantics.c (finish_id_expression): Reject capture of anonymous
union member.
......
......@@ -8442,7 +8442,8 @@ potential_constant_expression_1 (tree t, bool want_rval, tsubst_flags_t flags)
tree x = get_nth_callarg (t, 0);
if (is_this_parameter (x))
{
if (DECL_CONSTRUCTOR_P (DECL_CONTEXT (x)))
if (DECL_CONTEXT (x) == NULL_TREE
|| DECL_CONSTRUCTOR_P (DECL_CONTEXT (x)))
{
if (flags & tf_error)
sorry ("calling a member function of the "
......
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