git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 6/9] gettext.h: Avoid using a non-standard C construct

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 10, 2011, 12:54 UTC
Message-ID
<BANLkTimFQjbf6pz7upcb=QJngZdPTgWLmQ@mail.gmail.com>
In-Reply-To
<20110407221015.GA20080@elie>
On Fri, Apr 8, 2011 at 00:10, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 29 quoted lines
> Hi,
>
> Ramsay Jones wrote:
>
>> +++ b/gettext.h
>> @@ -35,6 +35,6 @@ const char *Q_(const char *msgid, const char *plu, unsigned long n)
> [...]
>> -#define N_(msgid) (msgid)
>> +#define N_(msgid) msgid
>
> Good catch.  Thanks!
>
>> In particular, standard C does not allow a parenthesized string
>> as an array initializer.
>
> The subject line seems unnecessarily vague.  Why not:
>
>        i18n: avoid parenthesized string as array initializer
>
>        The syntax
>
>                static const char ignore_error[] = ("something");
>
>        is invalid C.  GCC and MSVC can parse it, but for example
>        tcc cannot.  So remove the parenthesis from the definition
>        of the N_() macro.
>
>        Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
>        Acked-by: Jonathan Nieder <jrnieder@gmail.com>
This looks good to me with this commit message:
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Previous: Jonathan NiederNext: Ramsay Jones
Message 3 of 5 in “gettext.h: Avoid using a non-standard C construct”
  1. 6/9 gettext.h: Avoid using a non-standard C constructRamsay Jones, Apr 7, 2011
  2. Jonathan NiederApr 7, 2011
  3. Ævar Arnfjörð BjarmasonApr 10, 2011
  4. Ramsay JonesApr 11, 2011
  5. Junio C HamanoApr 11, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.