This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Some more translation related tweaks
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Volker Reichelt <v dot reichelt at netcologne dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Marek Polacek <polacek at redhat dot com>
- Date: Sun, 26 Feb 2017 13:35:55 +0100
- Subject: Re: [PATCH] Some more translation related tweaks
- Authentication-results: sourceware.org; auth=none
- References: <tkrat.a7532927a533bdd5@netcologne.de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Feb 26, 2017 at 01:18:57PM +0100, Volker Reichelt wrote:
> 2017-02-26 Volker Reichelt <v.reichelt@netcologne.de>
>
> * init.c: Include intl.h
Missing .
> @@ -29,6 +29,7 @@
> #include "varasm.h"
> #include "gimplify.h"
> #include "c-family/c-ubsan.h"
> +#include "intl.h"
>
> static bool begin_init_stmts (tree *, tree *);
> static tree finish_init_stmts (bool, tree, tree);
> @@ -2805,11 +2806,11 @@
> {
> const char *msg;
> if (typedef_variant_p (orig_type))
> - msg = ("non-constant array new length must be specified "
> - "directly, not by typedef");
> + msg = G_("non-constant array new length must be specified "
> + "directly, not by typedef");
> else
> - msg = ("non-constant array new length must be specified "
> - "without parentheses around the type-id");
> + msg = G_("non-constant array new length must be specified "
> + "without parentheses around the type-id");
> pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location),
> OPT_Wvla, msg);
This is not -Wformat-security friendly, perhaps better
pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location), OPT_Wvla,
typedef_variant_p (orig_type)
? "non-constant array new length must be specified "
"directly, not by typedef"
: "non-constant array new length must be specified "
"without parentheses around the type-id");
?
> }
> Index: gcc/cp/pt.c
> ===================================================================
> --- gcc/cp/pt.c (revision 245719)
> +++ gcc/cp/pt.c (working copy)
> @@ -17190,10 +17190,11 @@
> stricter. */
> bool in_lambda = (current_class_type
> && LAMBDA_TYPE_P (current_class_type));
> - char const *msg = "%qD was not declared in this scope, "
> - "and no declarations were found by "
> - "argument-dependent lookup at the point "
> - "of instantiation";
> + char const *const msg =
= should go on the next line in this case, i.e.
= G_("%qD was not declared in this scope, "
Jakub