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
This commit is contained in:
Volker Reichelt 2006-04-30 10:34:05 +00:00 committed by Volker Reichelt
parent 4e72e1c5a2
commit 85990800b1
4 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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. */

View File

@ -1,3 +1,8 @@
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

View File

@ -0,0 +1,4 @@
// PR c++/27278
// { dg-do compile }
int operator+(void,void); // { dg-error "incomplete type|invalid use" }