]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* constexpr.c (cxx_bind_parameters_in_call): Avoid gratuitous if
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 May 2016 20:58:21 +0000 (20:58 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 May 2016 20:58:21 +0000 (20:58 +0000)
... goto.
(cxx_eval_call_expression): Fix comment grammar.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236543 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/constexpr.c

index 06c38c67a9b70d546ed42248376f36f9611819f1..9618a28dadd76f4bd5f2cfc25f0043b11d5dd56c 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-20  Nathan Sidwell  <nathan@acm.org>
+
+       * constexpr.c (cxx_bind_parameters_in_call): Avoid gratuitous if
+       ... goto.
+       (cxx_eval_call_expression): Fix comment grammar.
+
 2016-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/70572
index 6054d1a9e3f76f8001e588fb8c6618124213919d..7b562605b7b2c766869d3cbb97c2daddf3a9df5f 100644 (file)
@@ -1201,18 +1201,18 @@ cxx_bind_parameters_in_call (const constexpr_ctx *ctx, tree t,
       /* Just discard ellipsis args after checking their constantitude.  */
       if (!parms)
        continue;
-      if (*non_constant_p)
-       /* Don't try to adjust the type of non-constant args.  */
-       goto next;
-
-      /* Make sure the binding has the same type as the parm.  */
-      if (TREE_CODE (type) != REFERENCE_TYPE)
-       arg = adjust_temp_type (type, arg);
-      if (!TREE_CONSTANT (arg))
-       *non_constant_args = true;
-      *p = build_tree_list (parms, arg);
-      p = &TREE_CHAIN (*p);
-    next:
+
+      if (!*non_constant_p)
+       {
+         /* Make sure the binding has the same type as the parm.  But
+            only for constant args.  */
+         if (TREE_CODE (type) != REFERENCE_TYPE)
+           arg = adjust_temp_type (type, arg);
+         if (!TREE_CONSTANT (arg))
+           *non_constant_args = true;
+         *p = build_tree_list (parms, arg);
+         p = &TREE_CHAIN (*p);
+       }
       parms = TREE_CHAIN (parms);
     }
 }
@@ -1420,7 +1420,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t,
          *slot = entry = ggc_alloc<constexpr_call> ();
          *entry = new_call;
        }
-      /* Calls which are in progress have their result set to NULL
+      /* Calls that are in progress have their result set to NULL,
         so that we can detect circular dependencies.  */
       else if (entry->result == NULL)
        {