fix "= { 0x1234 }" syntax to no longer interfere with C++11 "= default" syntax

This commit is contained in:
Wolfgang Thaller 2015-08-29 02:21:04 +02:00
parent a158475540
commit 1f0c52573c

View File

@ -17269,12 +17269,24 @@ cp_parser_init_declarator (cp_parser* parser,
initializer = cp_parser_pure_specifier (parser);
else
{
is_initialized = false;
cp_token *token;
cp_lexer_consume_token (parser->lexer);
token = cp_lexer_peek_token (parser->lexer);
if (token->keyword == RID_DEFAULT
|| token->keyword == RID_DELETE)
{
cp_lexer_consume_token (parser->lexer);
maybe_warn_cpp0x (CPP0X_DEFAULTED_DELETED);
initializer = token->u.value;
}
else
{
is_initialized = false;
tree rawinline_attr = cp_parser_inline_opcodes (parser);
decl_attributes (&decl, rawinline_attr, 0);
}
}
}
else
{
/* If the declaration was erroneous, we don't really