This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, c++ diagnostics] Fix c++ front end i18n problems
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Shujing Zhao <pearly dot zhao at oracle dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Paolo Bonzini <paolo dot bonzini at gmail dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Tue, 1 Dec 2009 03:37:35 -0600
- Subject: Re: [PATCH, c++ diagnostics] Fix c++ front end i18n problems
- References: <4B1492A5.7080706@oracle.com> <4B14D647.6080005@gnu.org>
On Tue, Dec 1, 2009 at 2:39 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 12/01/2009 04:51 AM, Shujing Zhao wrote:
>>
>> + ?if (candidates->next)
>> + ? ?str = "candidates are:";
>> + ?else
>> + ? ?str = "candidate is:";
>> +
>> ? ?/* Remove deleted candidates. ?*/
>
> Shouldn't the decision be taken _after_ removing deleted candidates?
>
>> +/* The various readonly error string used by readonly_error. ?*/
>> +typedef enum readonly_error_str
>> +{
>> + ?/* assignment */
>> + ?RES_ASSIGNMENT,
>> + ?/* assignment (via 'asm' output) */
>> + ?RES_ASSIGNMENT_ASM,
>> + ?/* increment */
>> + ?RES_INCREMENT,
>> + ?/* decrement */
>> + ?RES_DECREMENT
>> +} readonly_error_str;
>
> Leave this as an enum (no typedef).
In fact, the typedef is very much welcome -- so that we don't need
to write an enum specifier all the time.
[...]
>> @@ -15747,12 +15756,17 @@ most_specialized_class (tree type, tree
>
> You need to call gettext on str and wrap the strings (candidates
> are/candidate is) with G_("..."). ?Also, there is a "candidates is:" typo
> here.
>
>> - ? ? ? ? str = " ? ? ? ? ? ? ? ";
>> + ? ? ? ? str = " ? ? ? ? ? ? ? ";
>
> I'd just make str = "" here, since "candidate is" and "candidates are" have
> different sizes.
>
> I suggest you leave "candidate is" aside in the beginning and submit a patch
> for the rest. ?Then you can do a separate patch to fix the other issue --
> otherwise you'll make the same mistake as me and the patches will lie
> uncommitted for seven more years. ;-)
I don't understand this comment.
-- Gaby