tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
authorJakub Jelinek <jakub@redhat.com>
Sat, 25 Feb 2017 08:33:17 +0000 (09:33 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 25 Feb 2017 08:33:17 +0000 (09:33 +0100)
* tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
cp/
* call.c (build_op_delete_call): Make msg1 and msg2 const.

From-SVN: r245734

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/tree-ssa-loop-niter.c

index a38fd2063ecc6c6dd45bcdaccc7cbc02a5337c59..04d95a35f8be827723c6dfb05db9b19a18a0e1e8 100644 (file)
@@ -1,5 +1,7 @@
 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
 
+       * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
+
        PR debug/77589
        * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
        bitfield.
index 990f066c854b4baf80f573fc82a8d77a9a99428c..03b79f1355ec4f067cb9680dcb35667e601ed141 100644 (file)
@@ -1,3 +1,7 @@
+2017-02-25  Jakub Jelinek  <jakub@redhat.com>
+
+       * call.c (build_op_delete_call): Make msg1 and msg2 const.
+
 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/79588
index 7ff98726c72cb3dae8e8fcf1be9c66d41c21decc..dd09049f45212a3a058a19ac5d99edca8898d505 100644 (file)
@@ -6225,10 +6225,10 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
         allocation function, the program is ill-formed."  */
       if (second_parm_is_size_t (fn))
        {
-         const char *msg1
+         const char *const msg1
            = G_("exception cleanup for this placement new selects "
                 "non-placement operator delete");
-         const char *msg2
+         const char *const msg2
            = G_("%qD is a usual (non-placement) deallocation "
                 "function in C++14 (or with -fsized-deallocation)");
 
index 269a2ba86a3033eb4fcbcb486b878b8362290bab..d5eaa33e3ee2495db5f9d12c89f028234ee97e0d 100644 (file)
@@ -2362,13 +2362,9 @@ number_of_iterations_exit (struct loop *loop, edge exit,
     return true;
 
   if (warn)
-    {
-      const char *wording;
-
-      wording = N_("missed loop optimization, the loop counter may overflow");
-      warning_at (gimple_location_safe (stmt),
-                 OPT_Wunsafe_loop_optimizations, "%s", gettext (wording));
-    }
+    warning_at (gimple_location_safe (stmt),
+               OPT_Wunsafe_loop_optimizations,
+               "missed loop optimization, the loop counter may overflow");
 
   return false;
 }