On Thu, 7 Mar 2019, Jakub Jelinek wrote:

> Hi!
> 
> When looking at the diagnostics PRs, I've noticed that several diagnostic 
> calls
> in gimple-ssa-warn-alloca.c use G_(...) uselessly, it is only needed if the
> argument is not a string literal.
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
> verified the messages are unmodified in gcc.pot, ok for trunk?

OK.

Richard.

> 2019-03-07  Jakub Jelinek  <ja...@redhat.com>
> 
>       * gimple-ssa-warn-alloca.c (pass_walloca::execute): Don't wrap
>       warning_at or inform messages in G_() if there is no ?:.
> 
> --- gcc/gimple-ssa-warn-alloca.c.jj   2019-01-01 12:37:18.193957952 +0100
> +++ gcc/gimple-ssa-warn-alloca.c      2019-03-07 16:43:30.308166042 +0100
> @@ -528,7 +528,7 @@ pass_walloca::execute (function *fun)
>           }
>         else if (warn_alloca)
>           {
> -           warning_at (loc, OPT_Walloca, G_("use of %<alloca%>"));
> +           warning_at (loc, OPT_Walloca, "use of %<alloca%>");
>             continue;
>           }
>         else if (warn_alloca_limit < 0)
> @@ -571,8 +571,8 @@ pass_walloca::execute (function *fun)
>                   && t.limit != 0)
>                 {
>                   print_decu (t.limit, buff);
> -                 inform (loc, G_("limit is %wu bytes, but argument "
> -                                 "may be as large as %s"),
> +                 inform (loc, "limit is %wu bytes, but argument "
> +                              "may be as large as %s",
>                           is_vla ? warn_vla_limit : adjusted_alloca_limit,
>                           buff);
>                 }
> @@ -588,7 +588,7 @@ pass_walloca::execute (function *fun)
>                   && t.limit != 0)
>                 {
>                   print_decu (t.limit, buff);
> -                 inform (loc, G_("limit is %wu bytes, but argument is %s"),
> +                 inform (loc, "limit is %wu bytes, but argument is %s",
>                             is_vla ? warn_vla_limit : adjusted_alloca_limit,
>                             buff);
>                 }
> @@ -606,7 +606,7 @@ pass_walloca::execute (function *fun)
>             break;
>           case ALLOCA_IN_LOOP:
>             gcc_assert (!is_vla);
> -           warning_at (loc, wcode, G_("use of %<alloca%> within a loop"));
> +           warning_at (loc, wcode, "use of %<alloca%> within a loop");
>             break;
>           case ALLOCA_CAST_FROM_SIGNED:
>             gcc_assert (invalid_casted_type != NULL_TREE);
> 
>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to