OSDN Git Service

PR c++/50787
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Oct 2011 20:30:50 +0000 (20:30 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Oct 2011 20:30:50 +0000 (20:30 +0000)
* parser.c (cp_parser_initializer_clause): Don't call
maybe_constant_value here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@180204 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 41997fa..32c6d17 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-19  Jason Merrill  <jason@redhat.com>
+
+       PR c++/50787
+       * parser.c (cp_parser_initializer_clause): Don't call
+       maybe_constant_value here.
+
 2011-10-18  Jason Merrill  <jason@redhat.com>
 
        PR c++/50531
index 71c2ee9..da09e42 100644 (file)
@@ -16576,16 +16576,6 @@ cp_parser_initializer_clause (cp_parser* parser, bool* non_constant_p)
        = cp_parser_constant_expression (parser,
                                        /*allow_non_constant_p=*/true,
                                        non_constant_p);
-      if (!*non_constant_p)
-       {
-         /* We only want to fold if this is really a constant
-            expression.  FIXME Actually, we don't want to fold here, but in
-            cp_finish_decl.  */
-         tree folded = fold_non_dependent_expr (initializer);
-         folded = maybe_constant_value (folded);
-         if (TREE_CONSTANT (folded))
-           initializer = folded;
-       }
     }
   else
     initializer = cp_parser_braced_list (parser, non_constant_p);