From fab922b1f55fe7766a375d0ee28a1c48f3185250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Tue, 7 Jul 2009 02:10:19 +0000 Subject: c-lex.c: Replace %H by an explicit location. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2009-07-07 Manuel López-Ibáñez * c-lex.c: Replace %H by an explicit location. Update all calls. * c-common.c: Likewise. * c-decl.c: Likewise. * c-typeck.c: Likewise. * fold-const.c: Likewise. * gimplify.c: Likewise. * stmt.c: Likewise. * tree-cfg.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-vrp.c: Likewise. * value-prof.c: Likewise. java/ * jcf-parse.c: Replace %H by an explicit location. Update all calls. objc/ * objc-act.c: Replace %H by an explicit location. Update all calls. testsuite/ * gcc.dg/plugin/selfassign.c: Replace %H by an explicit location. Update all calls. * g++.dg/plugin/selfassign.c: Likewise. From-SVN: r149310 --- gcc/tree-vrp.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'gcc/tree-vrp.c') diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 13ed4c005b5..117b1992816 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5717,7 +5717,7 @@ vrp_evaluate_conditional (enum tree_code code, tree op0, tree op1, gimple stmt) location = input_location; else location = gimple_location (stmt); - warning (OPT_Wstrict_overflow, "%H%s", &location, warnmsg); + warning_at (location, OPT_Wstrict_overflow, "%s", warnmsg); } } @@ -5731,7 +5731,6 @@ vrp_evaluate_conditional (enum tree_code code, tree op0, tree op1, gimple stmt) the natural range of OP0's type, then the predicate will always fold regardless of the value of OP0. If -Wtype-limits was specified, emit a warning. */ - const char *warnmsg = NULL; tree type = TREE_TYPE (op0); value_range_t *vr0 = get_value_range (op0); @@ -5740,16 +5739,6 @@ vrp_evaluate_conditional (enum tree_code code, tree op0, tree op1, gimple stmt) && vrp_val_is_min (vr0->min) && vrp_val_is_max (vr0->max) && is_gimple_min_invariant (op1)) - { - if (integer_zerop (ret)) - warnmsg = G_("comparison always false due to limited range of " - "data type"); - else - warnmsg = G_("comparison always true due to limited range of " - "data type"); - } - - if (warnmsg) { location_t location; @@ -5758,7 +5747,10 @@ vrp_evaluate_conditional (enum tree_code code, tree op0, tree op1, gimple stmt) else location = gimple_location (stmt); - warning (OPT_Wtype_limits, "%H%s", &location, warnmsg); + warning_at (location, OPT_Wtype_limits, + integer_zerop (ret) + ? "comparison always false due to limited range of data type" + : "comparison always true due to limited range of data type"); } } @@ -6596,10 +6588,9 @@ simplify_div_or_mod_using_ranges (gimple stmt) location = input_location; else location = gimple_location (stmt); - warning (OPT_Wstrict_overflow, - ("%Hassuming signed overflow does not occur when " - "simplifying / or %% to >> or &"), - &location); + warning_at (location, OPT_Wstrict_overflow, + "assuming signed overflow does not occur when " + "simplifying % or %<%%%> to %<>>%> or %<&%>"); } } @@ -6679,10 +6670,9 @@ simplify_abs_using_ranges (gimple stmt) location = input_location; else location = gimple_location (stmt); - warning (OPT_Wstrict_overflow, - ("%Hassuming signed overflow does not occur when " - "simplifying abs (X) to X or -X"), - &location); + warning_at (location, OPT_Wstrict_overflow, + "assuming signed overflow does not occur when " + "simplifying % to % or %<-X%>"); } gimple_assign_set_rhs1 (stmt, op); -- cgit v1.2.1