From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"GIT Mailing-list" <git@vger.kernel.org>,
bebarino@gmail.com, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH 6/9] gettext.h: Avoid using a non-standard C construct
Date: Thu, 7 Apr 2011 17:10:15 -0500 [thread overview]
Message-ID: <20110407221015.GA20080@elie> (raw)
In-Reply-To: <4D9E056C.1070906@ramsay1.demon.co.uk>
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>
next prev parent reply other threads:[~2011-04-07 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 18:41 [PATCH 6/9] gettext.h: Avoid using a non-standard C construct Ramsay Jones
2011-04-07 22:10 ` Jonathan Nieder [this message]
2011-04-10 12:54 ` Ævar Arnfjörð Bjarmason
2011-04-11 17:15 ` Ramsay Jones
2011-04-11 20:13 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110407221015.GA20080@elie \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=bebarino@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.