* semantics.c (potential_constant_expression_1): Don't crash on
'this' in NSDMI.
From-SVN: r198154
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.
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 "