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:
parent
6d82bb8521
commit
a8fe5a30f2
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
11
gcc/testsuite/g++.dg/parse/ptrmem6.C
Normal file
11
gcc/testsuite/g++.dg/parse/ptrmem6.C
Normal file
@ -0,0 +1,11 @@
|
||||
//PR C++/27805
|
||||
|
||||
struct A;
|
||||
|
||||
void foo()
|
||||
{
|
||||
int A::* p;
|
||||
A a; // { dg-error "incomplete type" }
|
||||
a.*p;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user