diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a8a2c49..0f8d17c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -2779,7 +2779,10 @@ cp_parser_primary_expression (cp_parser *parser, /* The end of the cast-expression. */ && next_token->type != CPP_CLOSE_PAREN /* The end of an array bound. */ - && next_token->type != CPP_CLOSE_SQUARE) + && next_token->type != CPP_CLOSE_SQUARE + /* The closing ">" in a template-argument-list. */ + && (next_token->type != CPP_GREATER + || parser->greater_than_is_operator_p)) cast_p = false; } |