On 04/17/2018 10:33 AM, Jakub Jelinek wrote: > On Tue, Apr 17, 2018 at 10:29:35AM +0200, Martin Liška wrote: >> On 04/17/2018 10:28 AM, Martin Liška wrote: >>> I'm sending patch candidate. >> >> This one is the right one. > > Ok for stage1 with appropriate ChangeLog entries. > > Jakub >
Good, thanks. There's version I'll install once we flip into stage1 again. Martin
>From 93b53a0f55ebf4df7a96c620408af19546c7fc3a Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Tue, 17 Apr 2018 10:47:36 +0200 Subject: [PATCH] Fix GNU coding style for G_. gcc/ChangeLog: 2018-04-17 Martin Liska <mli...@suse.cz> * gimple-ssa-sprintf.c (format_directive): Do not use space in between 'G_' and '('. gcc/c-family/ChangeLog: 2018-04-17 Martin Liska <mli...@suse.cz> * c-warn.c (overflow_warning): Do not use space in between 'G_' and '('. gcc/testsuite/ChangeLog: 2018-04-17 Martin Liska <mli...@suse.cz> * gcc.dg/plugin/ggcplug.c (plugin_init): Do not use space in between 'G_' and '('. --- gcc/c-family/c-warn.c | 8 ++++---- gcc/gimple-ssa-sprintf.c | 12 ++++++------ gcc/testsuite/gcc.dg/plugin/ggcplug.c | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index d0d9c7894a8..2614eb58f14 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -98,10 +98,10 @@ overflow_warning (location_t loc, tree value, tree expr) case REAL_CST: warnfmt = (expr - ? G_ ("floating point overflow in expression %qE " - "of type %qT results in %qE") - : G_ ("floating point overflow in expression of type %qT " - "results in %qE")); + ? G_("floating point overflow in expression %qE " + "of type %qT results in %qE") + : G_("floating point overflow in expression of type %qT " + "results in %qE")); break; case FIXED_CST: diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index 4ec58605ce8..ec5e7046f6e 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -2933,12 +2933,12 @@ format_directive (const sprintf_dom_walker::call_info &info, else warned = fmtwarn (dirloc, argloc, NULL, info.warnopt (), fmtres.range.min > target_int_max () - ? G_ ("%<%.*s%> directive output between %wu and " - "%wu bytes causes result to exceed " - "%<INT_MAX%>") - : G_ ("%<%.*s%> directive output between %wu and " - "%wu bytes may cause result to exceed " - "%<INT_MAX%>"), dirlen, + ? G_("%<%.*s%> directive output between %wu and " + "%wu bytes causes result to exceed " + "%<INT_MAX%>") + : G_("%<%.*s%> directive output between %wu and " + "%wu bytes may cause result to exceed " + "%<INT_MAX%>"), dirlen, target_to_host (hostdir, sizeof hostdir, dir.beg), fmtres.range.min, fmtres.range.max); } diff --git a/gcc/testsuite/gcc.dg/plugin/ggcplug.c b/gcc/testsuite/gcc.dg/plugin/ggcplug.c index c4bc334868b..c186d119371 100644 --- a/gcc/testsuite/gcc.dg/plugin/ggcplug.c +++ b/gcc/testsuite/gcc.dg/plugin/ggcplug.c @@ -64,8 +64,8 @@ plugin_init (struct plugin_name_args *plugin_info, if (!strcmp (argv[i].key, "count-ggc-start")) { if (argv[i].value) - warning (0, G_ ("option '-fplugin-arg-%s-count-ggc-start=%s'" - " ignored (superfluous '=%s')"), + warning (0, G_("option '-fplugin-arg-%s-count-ggc-start=%s'" + " ignored (superfluous '=%s')"), plugin_name, argv[i].value, argv[i].value); else register_callback ("ggcplug", @@ -76,8 +76,8 @@ plugin_init (struct plugin_name_args *plugin_info, else if (!strcmp (argv[i].key, "count-ggc-end")) { if (argv[i].value) - warning (0, G_ ("option '-fplugin-arg-%s-count-ggc-end=%s'" - " ignored (superfluous '=%s')"), + warning (0, G_("option '-fplugin-arg-%s-count-ggc-end=%s'" + " ignored (superfluous '=%s')"), plugin_name, argv[i].value, argv[i].value); else register_callback ("ggcplug", @@ -88,8 +88,8 @@ plugin_init (struct plugin_name_args *plugin_info, else if (!strcmp (argv[i].key, "count-ggc-mark")) { if (argv[i].value) - warning (0, G_ ("option '-fplugin-arg-%s-count-ggc-mark=%s'" - " ignored (superfluous '=%s')"), + warning (0, G_("option '-fplugin-arg-%s-count-ggc-mark=%s'" + " ignored (superfluous '=%s')"), plugin_name, argv[i].value, argv[i].value); else register_callback ("ggcplug", @@ -100,8 +100,8 @@ plugin_init (struct plugin_name_args *plugin_info, else if (!strcmp (argv[i].key, "test-extra-root")) { if (argv[i].value) - warning (0, G_ ("option '-fplugin-arg-%s-test-extra-root=%s'" - " ignored (superfluous '=%s')"), + warning (0, G_("option '-fplugin-arg-%s-test-extra-root=%s'" + " ignored (superfluous '=%s')"), plugin_name, argv[i].value, argv[i].value); else register_callback ("ggcplug", -- 2.16.3