- if (!CLASS_TYPE_P (TREE_TYPE (decl))
- && !type_dependent_expression_p (decl))
+ if (!is_class && !type_dependent_expression_p (decl))
goto non_class;
}
-
+
cp_finish_decl (decl, init, !is_non_constant_init,
asm_specification,
LOOKUP_ONLYCONVERTING);
orig_init = init;
- if (CLASS_TYPE_P (TREE_TYPE (decl)))
+ if (is_class)
+ else if (is_cilk && next_is_op_paren)
+ {
+ cp_parser_require (parser, CPP_OPEN_PAREN, RT_OPEN_PAREN);
+ init = cp_parser_assignment_expression (parser);
+ cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN);
+ goto non_class;
+ }
+ else if (is_cilk && next_is_eq)
+ {
+ bool braced = false;
+ cp_parser_require (parser, CPP_EQ, RT_EQ);
+ if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
+ {
+ braced = true;
+ cp_parser_require (parser, CPP_OPEN_BRACE, RT_OPEN_BRACE);
+ }
+ init = cp_parser_assignment_expression (parser);
+ if (braced)
+ cp_parser_require (parser, CPP_CLOSE_BRACE, RT_CLOSE_BRACE);
+ goto non_class;
+ }
+ else if (is_cilk && next_is_op_brace)
+ {
+ cp_lexer_set_source_position (parser->lexer);
+ maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS);
+ cp_parser_require (parser, CPP_OPEN_BRACE, RT_OPEN_BRACE);
+ init = cp_parser_assignment_expression (parser);
+ cp_parser_require (parser, CPP_CLOSE_BRACE, RT_CLOSE_BRACE);
+ goto non_class;
+ }