diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 33780b8..6de230c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index dd7ddea..dbe9f5f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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'", |