On 11/13/2014 12:48 PM, Paolo Carlini wrote:
While we are at it, can you double check that in end_maybe_infinite_loop
we really want the non-sfinae version (which in principle can emit hard
errors): the inconsistency with begin_maybe_infinite_loop seems weird to
me...

I agree, let's use the sfinae version there too.

@@ -15998,7 +15998,7 @@ cp_parser_enumerator_definition (cp_parser* parser

   /* integral_constant_value will pull out this expression, so make sure
      it's folded as appropriate.  */
-  value = fold_non_dependent_expr (value);
+  value = instantiate_non_dependent_expr (value);

I think this should be replaced with fold_ if (processing_template_decl) in build_enumerator.

@@ -27724,7 +27724,7 @@ cp_parser_omp_clause_collapse (cp_parser *parser,

   if (num == error_mark_node)
     return list;
-  num = fold_non_dependent_expr (num);
+  num = instantiate_non_dependent_expr (num);

I think we want fold_ here.

   /* When we defer constant folding within a statement, we may want to
      defer this folding as well.  */
-  tree t = fold_non_dependent_expr_sfinae (init, complain);
+  tree t = instantiate_non_dependent_expr_sfinae (init, complain);
   t = maybe_constant_init (t);

Let's use it here, too.

Jason

Reply via email to