decl.c (grokparms): Check that INIT isn't an error_mark_node before giving error about invalid type...
* decl.c (grokparms): Check that INIT isn't an error_mark_node before giving error about invalid type for default arg. From-SVN: r20415
This commit is contained in:
parent
2682eae952
commit
347b529220
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
1998-06-10 Brendan Kehoe <brendan@cygnus.com>
|
||||
|
||||
* decl.c (grokparms): Check that INIT isn't an error_mark_node
|
||||
before giving error about invalid type for default arg.
|
||||
|
||||
1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* call.c (build_method_call): Fix thinko.
|
||||
|
|
|
@ -10585,6 +10585,7 @@ grokparms (first_parm, funcdef_flag)
|
|||
else
|
||||
init = require_instantiated_type (type, init, integer_zero_node);
|
||||
if (! processing_template_decl
|
||||
&& init != error_mark_node
|
||||
&& TREE_CODE (init) != DEFAULT_ARG
|
||||
&& ! can_convert_arg (type, TREE_TYPE (init), init))
|
||||
cp_pedwarn ("invalid type `%T' for default argument to `%#D'",
|
||||
|
|
Loading…
Add table
Reference in a new issue