bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc warning in argmatch


From: Bruno Haible
Subject: Re: gcc warning in argmatch
Date: Thu, 19 Oct 2006 21:09:16 +0200
User-agent: KMail/1.9.1

Paul Eggert wrote:
> but can you please hoist the call to gettext
> outside the conditional?  That is a tad easier for me to read and
> typically generates more-compact code.  Something like this:
> 
>   error (0, 0,
>          _(problem == -1
>            ? "invalid argument %s for %s"
>            : "ambiguous argument %s for %s"),
>          quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
>          quote_n (1, context));

xgettext is not guaranteed to work in this situation. Basically, there
are too many tokens between the _ and the strings. And there are two
strings. Should xgettext extract the first or the second string? Or both?
It is all unspecified. Even if it works with the current version of xgettext,
it could break in a future release.

Remember that xgettext doesn't have a C expression parser; it has only
minimal understanding of parentheses, commas, and function call syntax.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]