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:
parent
4e72e1c5a2
commit
85990800b1
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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
|
||||
|
4
gcc/testsuite/g++.dg/parse/operator7.C
Normal file
4
gcc/testsuite/g++.dg/parse/operator7.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/27278
|
||||
// { dg-do compile }
|
||||
|
||||
int operator+(void,void); // { dg-error "incomplete type|invalid use" }
|
Loading…
x
Reference in New Issue
Block a user