===================================================================
@@ -21482,7 +21491,12 @@ cp_parser_objc_method_keyword_params (cp_parser* p
}
maybe_unary_selector_p = false;
- cp_parser_require (parser, CPP_COLON, RT_COLON);
+ if (!cp_parser_require (parser, CPP_COLON, RT_COLON))
+ {
+ /* Something went quite wrong. There should be a colon
+ here, but there is not. Stop parsing parameters. */
+ break;
+ }
type_name = cp_parser_objc_typename (parser);
/* New ObjC allows attributes on parameters too. */
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_ATTRIBUTE))
===================================================================
@@ -0,0 +1,3 @@
+@implementation SaturnDoc /* { dg-warning "cannot find interface declaration" } */
+- read: (void*)aStream ggg /* { dg-error "expected .:. at end of input" } */
+/* { dg-error "expected ..end. at end of input" "" { target *-*-* } 2 } */