[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [WIP-PATCHES] Lisp (and Scheme) jump format specifier and ngettext
From: |
Miguel Ángel Arruga Vivas |
Subject: |
Re: [WIP-PATCHES] Lisp (and Scheme) jump format specifier and ngettext |
Date: |
Thu, 10 Dec 2020 00:47:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi Bruno,
Bruno Haible <bruno@clisp.org> writes:
> [...]
> This applies also to the other types of format strings: Omitting a
> variable in msgid_plural that is not of type integer should be invalid,
> i.e. produce an error in 'msgfmt -c'. For example in C:
>
> # Invalid: omitting a string-typed variable
> msgid "%s's %u thing"
> msgid_plural "%s's %u things"
> msgstr[0] "the %2$u thing"
> msgstr[1] "the %s's %u things"
>
> Right?
This currently fails for another reason; it says:
'msgstr[0]' is not a valid C format string, unlike
'msgid_plural'. Reason: The string refers to argument number 2 but
ignores argument number 1.
AFAIK, leaving holes between the parameters provided in the format
string is also undefined behaviour by POSIX-2001; e.g. %d and %f stack
size and alignment may be different, which affects the following
parameters.
Best regards,
Miguel