From 9d975cb6a6cf049da5c0c3fada48a9dc3c016c63 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 25 Feb 2017 09:33:17 +0100 Subject: [PATCH] tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning. * 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 | 2 ++ gcc/cp/ChangeLog | 4 ++++ gcc/cp/call.c | 4 ++-- gcc/tree-ssa-loop-niter.c | 10 +++------- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a38fd2063ec..04d95a35f8b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,7 @@ 2017-02-25 Jakub Jelinek + * 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. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 990f066c854..03b79f1355e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2017-02-25 Jakub Jelinek + + * call.c (build_op_delete_call): Make msg1 and msg2 const. + 2017-02-24 Jakub Jelinek PR c++/79588 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 7ff98726c72..dd09049f452 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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)"); diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 269a2ba86a3..d5eaa33e3ee 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -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; } -- 2.30.2