mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 16:30:53 +08:00
statement before variable declaration in cp_parser_initializer_list.
gcc/cp/ChangeLog: * parser.c (cp_parser_initializer_list): Move declaration of variable non_const to start of lexical block. From-SVN: r195013
This commit is contained in:
parent
0985d1f526
commit
80a8d5212e
@ -1,3 +1,8 @@
|
||||
2013-01-08 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* parser.c (cp_parser_initializer_list): Move declaration
|
||||
of variable non_const to start of lexical block.
|
||||
|
||||
2013-01-07 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/55753
|
||||
|
@ -17930,9 +17930,10 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p)
|
||||
&& cp_lexer_next_token_is (parser->lexer, CPP_OPEN_SQUARE))
|
||||
{
|
||||
/* In C++11, [ could start a lambda-introducer. */
|
||||
bool non_const = false;
|
||||
|
||||
cp_parser_parse_tentatively (parser);
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
bool non_const = false;
|
||||
designator = cp_parser_constant_expression (parser, true, &non_const);
|
||||
cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE);
|
||||
cp_parser_require (parser, CPP_EQ, RT_EQ);
|
||||
|
Loading…
x
Reference in New Issue
Block a user