Commit 1496e7d6 by Paolo Carlini Committed by Paolo Carlini

re PR c++/47795 (internal compiler error: tree check: expected record_type or…

re PR c++/47795 (internal compiler error: tree check: expected record_type or union_type or qual_union_type, have error_mark in finish_non_static_data_member, at cp/semantics.c:1513)

/cp
2011-02-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/47795
	* semantics.c (finish_non_static_data_member): Early return if
	object is error_mark_node.

/testsuite
2011-02-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/47795
	* g++.dg/cpp0x/lambda/lambda-ice3.C: New.

From-SVN: r170275
parent 237d6259
2011-02-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47795
* semantics.c (finish_non_static_data_member): Early return if
object is error_mark_node.
2011-02-18 Dodji Seketeli <dodji@redhat.com>
PR c++/47208
......
......@@ -1533,6 +1533,9 @@ finish_non_static_data_member (tree decl, tree object, tree qualifying_scope)
object = maybe_dummy_object (scope, NULL);
}
if (object == error_mark_node)
return error_mark_node;
/* DR 613: Can use non-static data members without an associated
object in sizeof/decltype/alignof. */
if (is_dummy_object (object) && cp_unevaluated_operand == 0
......
// PR c++/47795
// { dg-options "-std=c++0x" }
class Klass
{
unsigned int local;
public:
bool dostuff();
};
bool Klass::dostuff()
{
auto f = []() -> bool {
if (local & 1) { return true; } // { dg-error "not captured" }
return false;
};
}
int main()
{
Klass c;
return 0;
}
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