Commit 6e5bdc64 by Mark Mitchell Committed by Mark Mitchell

re PR c++/19811 (g++ 4.0: ICE on vector delete of undefined class)

	PR c++/19811
	* call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
	attempting name lookup.

	PR c++/19811
	* g++.dg/init/delete1.C: New test.

From-SVN: r94799
parent b2919b93
2005-02-09 Mark Mitchell <mark@codesourcery.com>
PR c++/19811
* call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
attempting name lookup.
* parser.c (cp_parser_unqualified_id): Initialize type_decl.
PR c++/19787
......
......@@ -3924,7 +3924,9 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
fnname = ansi_opname (code);
if (IS_AGGR_TYPE (type) && !global_p)
if (CLASS_TYPE_P (type)
&& COMPLETE_TYPE_P (complete_type (type))
&& !global_p)
/* In [class.free]
If the result of the lookup is ambiguous or inaccessible, or if
......
2005-02-09 Mark Mitchell <mark@codesourcery.com>
PR c++/19811
* g++.dg/init/delete1.C: New test.
2005-02-09 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/18470
......
// PR c++/19811
class C; // { dg-error "forward" }
void foo(void *p) {
delete [] ((C*)p) ; // { dg-error "" }
}
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