diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 6ad2282..bca1739 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -7031,6 +7031,32 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, break; } + case RID_BUILTIN_CONVERTVECTOR: + { + tree expression; + tree type; + /* Consume the `__builtin_convertvector' token. */ + cp_lexer_consume_token (parser->lexer); + /* Look for the opening `('. */ + matching_parens parens; + parens.require_open (parser); + /* Now, parse the assignment-expression. */ + expression = cp_parser_assignment_expression (parser); + /* Look for the `,'. */ + cp_parser_require (parser, CPP_COMMA, RT_COMMA); + location_t type_location + = cp_lexer_peek_token (parser->lexer)->location; + /* Parse the type-id. */ + { + type_id_in_expr_sentinel s (parser); + type = cp_parser_type_id (parser); + } + /* Look for the closing `)'. */ + parens.require_close (parser); + return cp_build_vec_convert (expression, type_location, type, + tf_warning_or_error); + } + default: { tree type; |