* gettext-tools/src/format-c.c (INVALID_SIZE_SPECIFIER): New macro.
* gettext-tools/src/format-c-parse.h (format_parse_entrails): Accept only one
size specifier, not a sequence of size specifiers. Accept "wN" and "wfN",
where N = 8, 16, 32, 64. Reject integer size specifiers for floating-point
directives. Reject integer size specifiers other than "l" for %c and %s.
* gettext-tools/tests/format-c-1: Add more test cases.
* gettext-tools/tests/format-c-2: Likewise.
* NEWS: Mention it.
ISO C 23, as tokens.
o xgettext and msgfmt now recognize the format string directive %b
(for binary integer output, as defined by ISO C 23) in format strings.
+ o xgettext and msgfmt now recognize the argument size specifiers
+ w8, w16, w32, w64, wf8, wf16, wf32, wf64 (as defined by ISO C 23)
+ in format strings.
- Tcl: xgettext now supports the \x, \u, and \U escapes as defined in
Tcl 8.6.
/* A directive. */
unsigned int number = 0;
format_arg_type_t type;
- format_arg_type_t size;
+ /* Relevant for the conversion characters d, i, b, o, u, x, X, n. */
+ format_arg_type_t integer_size;
+ /* Relevant for the conversion characters a, A, e, E, f, F, g, G. */
+ format_arg_type_t floatingpoint_size;
FDI_SET (format - 1, FMTDIR_START);
spec.directives++;
else
{
/* Parse size. */
- size = 0;
- for (;; format++)
+ integer_size = 0;
+ floatingpoint_size = 0;
+
+ if (*format == 'h')
{
- if (*format == 'h')
+ if (format[1] == 'h')
{
- if (size & (FAT_SIZE_SHORT | FAT_SIZE_CHAR))
- size = FAT_SIZE_CHAR;
- else
- size = FAT_SIZE_SHORT;
+ integer_size = FAT_SIZE_CHAR;
+ format += 2;
}
- else if (*format == 'l')
+ else
{
- if (size & (FAT_SIZE_LONG | FAT_SIZE_LONGLONG))
- size = FAT_SIZE_LONGLONG;
- else
- size = FAT_SIZE_LONG;
+ integer_size = FAT_SIZE_SHORT;
+ format++;
}
- else if (*format == 'L')
- size = FAT_SIZE_LONGLONG;
- else if (*format == 'q')
- /* Old BSD 4.4 convention. */
- size = FAT_SIZE_LONGLONG;
- else if (*format == 'j')
- size = FAT_SIZE_INTMAX_T;
- else if (*format == 'z' || *format == 'Z')
- /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
- because the warning facility in gcc-2.95.2 understands
- only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
- size = FAT_SIZE_SIZE_T;
- else if (*format == 't')
- size = FAT_SIZE_PTRDIFF_T;
-#if defined _WIN32 && ! defined __CYGWIN__
- else if (SYSDEP_SEGMENTS_PROCESSED
- && *format == 'I'
- && format[1] == '6'
- && format[2] == '4')
+ }
+ else if (*format == 'l')
+ {
+ if (format[1] == 'l')
{
- size = FAT_SIZE_64_T;
+ integer_size = FAT_SIZE_LONGLONG;
+ /* For backward compatibility only. */
+ floatingpoint_size = FAT_SIZE_LONGLONG;
format += 2;
}
-#endif
else
- break;
+ {
+ integer_size = FAT_SIZE_LONG;
+ format++;
+ }
+ }
+ else if (*format == 'L'
+ /* Old BSD 4.4 convention. */
+ || *format == 'q')
+ {
+ integer_size = FAT_SIZE_LONGLONG;
+ floatingpoint_size = FAT_SIZE_LONGLONG;
+ format++;
+ }
+ else if (*format == 'j')
+ {
+ integer_size = FAT_SIZE_INTMAX_T;
+ format++;
+ }
+ else if (*format == 'z' || *format == 'Z')
+ {
+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+ because the warning facility in gcc-2.95.2 understands
+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
+ integer_size = FAT_SIZE_SIZE_T;
+ format++;
+ }
+ else if (*format == 't')
+ {
+ integer_size = FAT_SIZE_PTRDIFF_T;
+ format++;
+ }
+ else if (*format == 'w')
+ {
+ /* wN and wfN are standardized in ISO C 23. */
+ if (format[1] == 'f')
+ {
+ if (format[2] == '8')
+ {
+ integer_size = FAT_SIZE_FAST8_T;
+ format += 3;
+ }
+ else if (format[2] == '1' && format[3] == '6')
+ {
+ integer_size = FAT_SIZE_FAST16_T;
+ format += 4;
+ }
+ else if (format[2] == '3' && format[3] == '2')
+ {
+ integer_size = FAT_SIZE_FAST32_T;
+ format += 4;
+ }
+ else if (format[2] == '6' && format[3] == '4')
+ {
+ integer_size = FAT_SIZE_FAST64_T;
+ format += 4;
+ }
+ }
+ else
+ {
+ if (format[1] == '8')
+ {
+ integer_size = FAT_SIZE_LEAST8_T;
+ format += 2;
+ }
+ else if (format[1] == '1' && format[2] == '6')
+ {
+ integer_size = FAT_SIZE_LEAST16_T;
+ format += 3;
+ }
+ else if (format[1] == '3' && format[2] == '2')
+ {
+ integer_size = FAT_SIZE_LEAST32_T;
+ format += 3;
+ }
+ else if (format[1] == '6' && format[2] == '4')
+ {
+ integer_size = FAT_SIZE_LEAST64_T;
+ format += 3;
+ }
+ }
+ }
+#if defined _WIN32 && ! defined __CYGWIN__
+ else if (SYSDEP_SEGMENTS_PROCESSED
+ && *format == 'I'
+ && format[1] == '6'
+ && format[2] == '4')
+ {
+ integer_size = FAT_SIZE_64_T;
+ format += 3;
}
+#endif
+ if (!((integer_size & ~FAT_SIZE_MASK) == 0))
+ abort ();
+ if (!((floatingpoint_size & ~FAT_SIZE_LONGLONG) == 0))
+ abort ();
switch (*format)
{
break;
case 'c':
type = FAT_CHAR;
- type |= (size & (FAT_SIZE_LONG | FAT_SIZE_LONGLONG)
- ? FAT_WIDE : 0);
+ if (integer_size != 0)
+ {
+ if (integer_size != FAT_SIZE_LONG)
+ {
+ *invalid_reason = INVALID_SIZE_SPECIFIER (spec.directives);
+ FDI_SET (format, FMTDIR_ERROR);
+ goto bad_format;
+ }
+ type |= FAT_WIDE;
+ }
break;
case 'C': /* obsolete */
type = FAT_CHAR | FAT_WIDE;
break;
case 's':
type = FAT_STRING;
- type |= (size & (FAT_SIZE_LONG | FAT_SIZE_LONGLONG)
- ? FAT_WIDE : 0);
+ if (integer_size != 0)
+ {
+ if (integer_size != FAT_SIZE_LONG)
+ {
+ *invalid_reason = INVALID_SIZE_SPECIFIER (spec.directives);
+ FDI_SET (format, FMTDIR_ERROR);
+ goto bad_format;
+ }
+ type |= FAT_WIDE;
+ }
break;
case 'S': /* obsolete */
type = FAT_STRING | FAT_WIDE;
break;
case 'i': case 'd':
- type = FAT_INTEGER;
- type |= (size & FAT_SIZE_MASK);
+ type = FAT_INTEGER | integer_size;
break;
case 'u': case 'o': case 'x': case 'X': case 'b':
- type = FAT_INTEGER | FAT_UNSIGNED;
- type |= (size & FAT_SIZE_MASK);
+ type = FAT_INTEGER | FAT_UNSIGNED | integer_size;
break;
case 'e': case 'E': case 'f': case 'F': case 'g': case 'G':
case 'a': case 'A':
- type = FAT_DOUBLE;
- type |= (size & FAT_SIZE_LONGLONG);
+ if (integer_size != 0 && floatingpoint_size == 0)
+ {
+ *invalid_reason = INVALID_SIZE_SPECIFIER (spec.directives);
+ FDI_SET (format, FMTDIR_ERROR);
+ goto bad_format;
+ }
+ type = FAT_DOUBLE | floatingpoint_size;
break;
case '@':
if (objc_extensions)
type = FAT_POINTER;
break;
case 'n':
- type = FAT_COUNT_POINTER;
- type |= (size & FAT_SIZE_MASK);
+ type = FAT_COUNT_POINTER | integer_size;
break;
other:
default:
/* C format strings.
- Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010, 2019, 2023 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
#define INVALID_ANGLE_BRACKET(directive_number) \
xasprintf (_("In the directive number %u, the token after '<' is not followed by '>'."), directive_number)
+#define INVALID_SIZE_SPECIFIER(directive_number) \
+ xasprintf (_("In the directive number %u, the argument size specifier is invalid."), directive_number)
+
#define INVALID_IGNORED_ARGUMENT(referenced_arg, ignored_arg) \
xasprintf (_("The string refers to argument number %u but ignores argument number %u."), referenced_arg, ignored_arg)
"abc%zi"
# Valid: one argument with size specifier
"abc%ti"
+# Valid: one argument with size specifier
+"abc%w8i"
+# Valid: one argument with size specifier
+"abc%w16i"
+# Valid: one argument with size specifier
+"abc%w32i"
+# Valid: one argument with size specifier
+"abc%w64i"
+# Valid: one argument with size specifier
+"abc%wf8i"
+# Valid: one argument with size specifier
+"abc%wf16i"
+# Valid: one argument with size specifier
+"abc%wf32i"
+# Valid: one argument with size specifier
+"abc%wf64i"
+# Invalid: one argument with unsupported size specifier
+"abc%w4i"
+# Invalid: one argument with unsupported size specifier
+"abc%wf4i"
+# Invalid: one floating-point argument with integer size specifier
+"abc%hhg"
+# Invalid: one floating-point argument with integer size specifier
+"abc%hg"
+# Invalid: one floating-point argument with integer size specifier
+"abc%lg"
+# Valid: one floating-point argument with integer size specifier equivalent to 'L'
+"abc%llg"
+# Valid: one floating-point argument with integer size specifier equivalent to 'L'
+"abc%qg"
+# Invalid: one floating-point argument with integer size specifier
+"abc%jg"
+# Invalid: one floating-point argument with integer size specifier
+"abc%zg"
+# Invalid: one floating-point argument with integer size specifier
+"abc%tg"
+# Invalid: one floating-point argument with integer size specifier
+"abc%w8g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%w16g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%w32g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%w64g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%wf8g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%wf16g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%wf32g"
+# Invalid: one floating-point argument with integer size specifier
+"abc%wf64g"
+# Valid: one argument with size specifier
+"abc%lc"
+# Invalid: one character argument with integer size specifier
+"abc%llc"
+# Invalid: one character argument with integer size specifier
+"abc%Lc"
+# Invalid: one character argument with integer size specifier
+"abc%qc"
+# Valid: one argument with size specifier
+"abc%ls"
+# Invalid: one string argument with integer size specifier
+"abc%hhs"
+# Invalid: one string argument with integer size specifier
+"abc%hs"
+# Invalid: one string argument with integer size specifier
+"abc%lls"
+# Invalid: one string argument with integer size specifier
+"abc%Ls"
+# Invalid: one string argument with integer size specifier
+"abc%qs"
+# Invalid: one string argument with integer size specifier
+"abc%js"
+# Invalid: one string argument with integer size specifier
+"abc%zs"
+# Invalid: one string argument with integer size specifier
+"abc%ts"
+# Invalid: one string argument with integer size specifier
+"abc%w8s"
+# Invalid: one string argument with integer size specifier
+"abc%w16s"
+# Invalid: one string argument with integer size specifier
+"abc%w32s"
+# Invalid: one string argument with integer size specifier
+"abc%w64s"
+# Invalid: one string argument with integer size specifier
+"abc%wf8s"
+# Invalid: one string argument with integer size specifier
+"abc%wf16s"
+# Invalid: one string argument with integer size specifier
+"abc%wf32s"
+# Invalid: one string argument with integer size specifier
+"abc%wf64s"
# Invalid: unterminated
"abc%"
# Invalid: unknown format specifier
# Invalid: added argument
msgid "abc%1$udef"
msgstr "xyz%1$uvw%2$c"
+
# Valid: type compatibility
msgid "abc%i"
msgstr "xyz%d"
+
# Valid: type compatibility
msgid "abc%o"
msgstr "xyz%u"
# Valid: type compatibility
msgid "abc%u"
msgstr "xyz%b"
+
# Valid: type compatibility
msgid "abc%e"
msgstr "xyz%E"
# Valid: type compatibility
msgid "abc%e"
msgstr "xyz%A"
+
# Invalid: type incompatibility
msgid "abc%c"
msgstr "xyz%s"
# Invalid: type incompatibility
msgid "abc%c"
msgstr "xyz%n"
+
# Invalid: type incompatibility
msgid "abc%s"
msgstr "xyz%i"
# Invalid: type incompatibility
msgid "abc%s"
msgstr "xyz%n"
+
# Invalid: type incompatibility
msgid "abc%i"
msgstr "xyz%o"
# Invalid: type incompatibility
msgid "abc%i"
msgstr "xyz%n"
+
# Invalid: type incompatibility
msgid "abc%u"
msgstr "xyz%e"
# Invalid: type incompatibility
msgid "abc%u"
msgstr "xyz%n"
+
# Invalid: type incompatibility
msgid "abc%e"
msgstr "xyz%p"
# Invalid: type incompatibility
msgid "abc%e"
msgstr "xyz%n"
+
# Invalid: type incompatibility
msgid "abc%p"
msgstr "xyz%n"
+
# Invalid: type incompatibility due to size
msgid "abc%i"
msgstr "xyz%hhi"
# Invalid: type incompatibility due to size
msgid "abc%i"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%i"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%hhi"
msgstr "xyz%hi"
# Invalid: type incompatibility due to size
msgid "abc%hhi"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%hhi"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%hi"
msgstr "xyz%li"
# Invalid: type incompatibility due to size
msgid "abc%hi"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%hi"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%li"
msgstr "xyz%lli"
# Invalid: type incompatibility due to size
msgid "abc%li"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%li"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%lli"
msgstr "xyz%ji"
# Invalid: type incompatibility due to size
msgid "abc%lli"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%lli"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%Li"
msgstr "xyz%ji"
# Invalid: type incompatibility due to size
msgid "abc%Li"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%Li"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%qi"
msgstr "xyz%ji"
# Invalid: type incompatibility due to size
msgid "abc%qi"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%qi"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%ji"
msgstr "xyz%zi"
# Invalid: type incompatibility due to size
msgid "abc%ji"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%ji"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility due to size
msgid "abc%zi"
msgstr "xyz%ti"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%zi"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%w8i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%ti"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%w16i"
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%w8i"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%w16i"
+msgstr "xyz%w32i"
+# Invalid: type incompatibility due to size
+msgid "abc%w16i"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%w16i"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%w16i"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%w16i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%w16i"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%w32i"
+msgstr "xyz%w64i"
+# Invalid: type incompatibility due to size
+msgid "abc%w32i"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%w32i"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%w32i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%w32i"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%w64i"
+msgstr "xyz%wf8i"
+# Invalid: type incompatibility due to size
+msgid "abc%w64i"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%w64i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%w64i"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%wf8i"
+msgstr "xyz%wf16i"
+# Invalid: type incompatibility due to size
+msgid "abc%wf8i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%wf8i"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%wf16i"
+msgstr "xyz%wf32i"
+# Invalid: type incompatibility due to size
+msgid "abc%wf16i"
+msgstr "xyz%wf64i"
+
+# Invalid: type incompatibility due to size
+msgid "abc%wf32i"
+msgstr "xyz%wf64i"
+
# Invalid: type incompatibility for width
msgid "abc%g%*g"
msgstr "xyz%*g%g"
: ${MSGFMT=msgfmt}
n=0
while read comment; do
+ if test -z "$comment"; then
+ read comment
+ fi
read msgid_line
read msgstr_line
n=`expr $n + 1`