Thread (4 messages) 4 messages, 3 authors, 2016-06-15

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

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:51:01

On Fri, Apr 8, 2011 at 00:10, Jonathan Nieder [off-list ref] wrote:
Hi,

Ramsay Jones wrote:
quoted
+++ b/gettext.h
@@ -35,6 +35,6 @@ const char *Q_(const char *msgid, const char *plu, unsigned long n)
[...]
quoted
-#define N_(msgid) (msgid)
+#define N_(msgid) msgid
Good catch.  Thanks!
quoted
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 [off-list ref]
       Acked-by: Jonathan Nieder [off-list ref]
This looks good to me with this commit message:

Acked-by: Ævar Arnfjörð Bjarmason <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help