vfprintf typing problem
Carlos O'Donell
carlos@systemhalted.org
Thu Mar 29 17:06:00 GMT 2012
On Thu, Mar 29, 2012 at 12:53 PM, Roland McGrath <roland@hack.frob.com> wrote:
> Ok, that is rather indirect but seems to say that any situation in which
> the total output requested would exceed INT_MAX chars should be diagnosed
> with EOVERFLOW. At least for snprintf, anyway. We don't really seem to
> diagnose that case as such. Instead we have various checks that individual
> pieces of the format aren't going to overflow size_t, and those are
> diagnosed with ERANGE. And the standard still doesn't really say anything
> about fprintf, only snprintf. It seems to be quite a mess.
My opinion here is that if things are a mess then we *should* have a
go at untangling the mess, documenting it, and then using our members
and users to try get the changes into the official international
standards. As far as I know Joseph and myself are on our countries
respective standards bodies e.g. BSI and SCC.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list