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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to James K. Lowden from comment #2)
> > The ones mentioning 'z' are gettext fault, %zd/%zu is supported in 
> > gcc-internal-format.
> 
> gettext "15.3.1 C Format Strings" references POSIX, 
> 
> http://www.opengroup.org/onlinepubs/007904975/functions/fprintf.html
> 
> which defines z and l as length modifiers.  Are we sure z is not allowed? 

Not all targets have POSIX compatible C library.
z is actually also ISO C99 and later modifier, but e.g. HPUX doesn't implement
that.

I've changed all the z modifier uses in the FE in *printf family functions to
HOST_SIZE_T_PRINT_UNSIGNED etc. macros and (fmt_size_t) casts, but perhaps some
new ones slipped in since then.
Note, z modifier in gcc-internal-format functions (error etc.) are fine, there
we do control the implementation and know it is always present (and using
macros is undesirable because it kills translations).

Reply via email to