[PATCH 2/2] gettext.h: add parentheses around N_ expansion

2015-01-06 Thread Kyle J. McKay
The N_ macro is used to mark strings for translation without actually translating them. At runtime the string is expected to be passed to the gettext API for translation. If two N_ macro invocations appear next to each other with only whitespace (or nothing at all) between them, the two separate

Re: [PATCH 2/2] gettext.h: add parentheses around N_ expansion

2015-01-06 Thread Ramsay Jones
On 06/01/15 10:34, Kyle J. McKay wrote: The N_ macro is used to mark strings for translation without actually translating them. At runtime the string is expected to be passed to the gettext API for translation. If two N_ macro invocations appear next to each other with only whitespace (or

Re: [PATCH 2/2] gettext.h: add parentheses around N_ expansion

2015-01-06 Thread Kyle J. McKay
On Jan 6, 2015, at 05:24, Ramsay Jones wrote: On 06/01/15 10:34, Kyle J. McKay wrote: Avoid this by adding parentheses around the expansion of the N_ macro so that instead of ending up with two adjacent strings that are then combined by the preprocessor, two adjacent strings surrounded by

Re: [PATCH 2/2] gettext.h: add parentheses around N_ expansion

2015-01-06 Thread Andreas Schwab
Kyle J. McKay mack...@gmail.com writes: Even clang -ansi -pedantic doesn't seem to complain about this. And (a) is just as much a constant expression as a. Are you sure it's not just a tcc bug? The C standard asks for a string literal as the initializer, not an expression. Andreas. --