[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] printf (_("...%zu..."), X) where X is of type size_t
From: |
Paul Eggert |
Subject: |
Re: [bug-gnulib] printf (_("...%zu..."), X) where X is of type size_t |
Date: |
Tue, 04 Oct 2005 16:30:28 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Bruno Haible <address@hidden> writes:
> 4) Assume that size_t is not larger than 'unsigned long', and do
>
> printf (_("The size is %lu.\n"), (unsigned long) size);
>
> I personally always use #4.
Yes, that's what I do too. It's not pretty, but the alternatives are
worse. Thanks for the clear explanation of the alternatives
(including why my suggestions weren't all that great....).
> The standards authors probably thought such macros are useless because
> the size specifier 'z' already plays that role.
That doesn't fully explain the omission, since they defined macros
like PRIuMAX even though the size specifier 'j' already plays that role.