parser.c (cp_parser_braced_list): For {} initialize *non_constant_p to false.
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Mar 2013 14:14:16 +0000 (15:14 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Mar 2013 14:14:16 +0000 (15:14 +0100)
* parser.c (cp_parser_braced_list): For {} initialize
*non_constant_p to false.

From-SVN: r196463

gcc/cp/ChangeLog
gcc/cp/parser.c

index 8243e67b30d00d5473cf30e0cef2da83bb97ac90..76911896908c1c51429b9840fd28cfe7ad01fc8e 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+       * parser.c (cp_parser_braced_list): For {} initialize
+       *non_constant_p to false.
+
 2013-03-04  Jason Merrill  <jason@redhat.com>
 
        PR c++/56464
index d18e0278cdeb1965d36af7dd8bb3e93335ecc68b..97e610ce79f9f303ca47bae6d5b53127af9d1fbd 100644 (file)
@@ -17854,6 +17854,8 @@ cp_parser_braced_list (cp_parser* parser, bool* non_constant_p)
       if (cp_lexer_next_token_is (parser->lexer, CPP_COMMA))
        cp_lexer_consume_token (parser->lexer);
     }
+  else
+    *non_constant_p = false;
   /* Now, there should be a trailing `}'.  */
   cp_parser_require (parser, CPP_CLOSE_BRACE, RT_CLOSE_BRACE);
   TREE_TYPE (initializer) = init_list_type_node;