[gcc(refs/vendors/ibm/heads/perf)] c++: Use %qs in diagnostic message [PR93882]

Jiu Fu Guo guojiufu@gcc.gnu.org
Thu Mar 19 05:47:48 GMT 2020


https://gcc.gnu.org/g:6cd5024c8643b4359825219cdc3ae7280018d06d

commit 6cd5024c8643b4359825219cdc3ae7280018d06d
Author: Marek Polacek <polacek@redhat.com>
Date:   Sat Feb 22 11:53:45 2020 -0500

    c++: Use %qs in diagnostic message [PR93882]
    
    A tweak for translators, as requested in the PR.
    
    2020-02-22  Marek Polacek  <polacek@redhat.com>
    
            PR c++/93882
            * decl.c (grokdeclarator): Use %qs in a diagnostic message.

Diff:
---
 gcc/cp/ChangeLog | 5 +++++
 gcc/cp/decl.c    | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a9c0f1a8ecf..8a3c9f77ad0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-22  Marek Polacek  <polacek@redhat.com>
+
+	PR c++/93882
+	* decl.c (grokdeclarator): Use %qs in a diagnostic message.
+
 2020-02-21  Martin Sebor  <msebor@redhat.com>
 
 	PR gcov-profile/93753
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 31a556a0a1f..1947c4ddb7f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11251,7 +11251,7 @@ grokdeclarator (const cp_declarator *declarator,
   if (constinit_p && typedef_p)
     {
       error_at (declspecs->locations[ds_constinit],
-		"%<constinit%> cannot appear in a typedef declaration");
+		"%qs cannot appear in a typedef declaration", "constinit");
       return error_mark_node;
     }


More information about the Gcc-cvs mailing list