Bug 31665

Summary: %s substituted with "built-in"/"library" can't be properly translated
Product: gcc Reporter: Göran Uddeborg <goeran>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3    
Version: 4.3.0   
Target Milestone: 4.5.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 40883    

Description Göran Uddeborg 2007-04-23 14:52:29 UTC
In cp/decl.c there is this code

	      warning (OPT_Wshadow, "shadowing %s function %q#D",
		       DECL_BUILT_IN (olddecl) ? "built-in" : "library",
		       olddecl);

The strings substituted for the first %s are not available for translation, so
this can not be properly translated.  Even if they were, composing a sentence
like this is not in general possible to do for an arbitrary language.
Comment 1 Shujing Zhao 2009-12-18 08:50:53 UTC
Subject: Bug 31665

Author: pzhao
Date: Fri Dec 18 08:50:24 2009
New Revision: 155340

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155340
Log:
cp/
2009-12-16  Shujing Zhao  <pearly.zhao@oracle.com>

        PR c++/31665
        * decl.c (duplicate_decls, grokdeclarator): Put the
        diagnostics in full sentences for easy translation and wrapped into
        G_().
        * typeck.c (build_x_unary_op): Likewise.

testsuite/
2009-12-16  Shujing Zhao  <pearly.zhao@oracle.com>

        * g++.old-deja/g++.brendan/misc6.C: Make expected dg-error strings
        explicit.


Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.old-deja/g++.brendan/misc6.C

Comment 2 Paolo Carlini 2009-12-18 09:35:54 UTC
Fixed.