Commit 85990800 by Volker Reichelt Committed by Volker Reichelt

re PR c++/27278 (ICE with invalid operator declaration)

	PR c++/27278
	* decl.c (grok_op_properties): Skip operators with invalid args
	when checking for class-type or enum-type args.

	* g++.dg/parse/operator7.C: New test.

From-SVN: r113389
parent 4e72e1c5
2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27278
* decl.c (grok_op_properties): Skip operators with invalid args
when checking for class-type or enum-type args.
2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27279
......
......@@ -9086,6 +9086,9 @@ grok_op_properties (tree decl, bool complain)
for (p = argtypes; p && p != void_list_node; p = TREE_CHAIN (p))
{
tree arg = non_reference (TREE_VALUE (p));
if (arg == error_mark_node)
return;
/* IS_AGGR_TYPE, rather than CLASS_TYPE_P, is used
because these checks are performed even on
template functions. */
......
2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27278
* g++.dg/parse/operator7.C: New test.
2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/11471
// PR c++/27278
// { dg-do compile }
int operator+(void,void); // { dg-error "incomplete type|invalid use" }
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