re PR c++/27805 (ICE with ptr-to-member of incomplete class)

PR c++/27805
* typeck2.c (build_m_component_ref): Use error_operand_p.

From-SVN: r114897
This commit is contained in:
Lee Millward 2006-06-22 17:48:41 +00:00 committed by Lee Millward
parent 6d82bb8521
commit a8fe5a30f2
4 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-06-22 Lee Millward <lee.millward@gmail.com>
PR c++/27805
* typeck2.c (build_m_component_ref): Use error_operand_p.
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28111

View File

@ -1200,7 +1200,7 @@ build_m_component_ref (tree datum, tree component)
tree binfo;
tree ctype;
if (datum == error_mark_node || component == error_mark_node)
if (error_operand_p (datum) || error_operand_p (component))
return error_mark_node;
ptrmem_type = TREE_TYPE (component);

View File

@ -1,3 +1,8 @@
2006-06-22 Lee Millward <lee.millward@gmail.com>
PR c++/27805
* g++.dg/parse/ptrmem6.C: New test.
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28111

View File

@ -0,0 +1,11 @@
//PR C++/27805
struct A;
void foo()
{
int A::* p;
A a; // { dg-error "incomplete type" }
a.*p;
}