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

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

 



Jonathan Nieder 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@xxxxxxxxxxxxxxxxxxx>
> 	Acked-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> 

Sounds good to me. I'll re-roll and use your message verbatim.

Thanks!

ATB,
Ramsay Jones



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]