https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119684

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Is it just about nice to have verification or does msgfmt etc. refuse to
include translations which contain unknown format specifiers?

Looking at the 4.3 to trunk diff of just pretty-print.{c,cc} documented format
string specifiers, I see:
    %ld, %li, %lo, %lu, %lx: long versions of the above.
    %lld, %lli, %llo, %llu, %llx: long long versions.
    %wd, %wi, %wo, %wu, %wx: HOST_WIDE_INT versions.
+   %zd, %zi, %zo, %zu, %zx: size_t versions.
+   %td, %ti, %to, %tu, %tx: ptrdiff_t versions.
+   %f: double
    %c: character.
    %s: string.
-   %p: pointer.
+   %p: pointer (printed in a host-dependent manner).
+   %r: if pp_show_color(pp), switch to color identified by const char *.
+   %R: if pp_show_color(pp), reset color.
    %m: strerror(text->err_no) - does not consume a value from args_ptr.
    %%: '%'.
    %<: opening quote.
    %>: closing quote.
+   %{: URL start.  Consumes a const char * argument for the URL.
+   %}: URL end.    Does not consume any arguments.
    %': apostrophe (should only be used in untranslated messages;
        translations should use appropriate punctuation directly).
+   %@: diagnostic_event_id_ptr, for which event_id->known_p () must be true.
    %.*s: a substring the length of which is specified by an argument
         integer.
    %Ns: likewise, but length specified as constant in the format string.
-   %H: location_t.
-   %J: a decl tree, from which DECL_SOURCE_LOCATION will be recorded.
-   %K: a statement, from which EXPR_LOCATION and TREE_BLOCK will be recorded.
    Flag 'q': quote formatted text (must come immediately after '%').
+   %Z: Requires two arguments - array of int, and len. Prints elements
+   of the array.
+
+   %e: Consumes a pp_element * argument.

The z/t stuff above is what my patch above attempts to solve (for
gcc-internal-format only, we need it for gfc as well, or ideally somehow
simplify the two so that it handles the common subset by the same code).
%f, %r, %R, %{, %}, %@, %Z and %e are documented additions, %H/%J/%K were
removed but AFAIK not reused, so the support can be kept in gettext.

Reply via email to