[RFC] PR6015, snprintf, glibc2.3 and all that...
Ulrich Drepper
drepper@redhat.com
Thu Apr 4 00:26:00 GMT 2002
On Thu, 2002-04-04 at 00:15, Paolo Carlini wrote:
> May I ask which are your feelings about this issue at large? Does it
> make sense to envisage a "C"-locale only, minimal, snprintf to be used
> for low-level (MT-clean, indeed) number formatting in v3?
You probably underestimate the amount of work and code this requires.
For int formatting without high performance expectations you might get
away with reasonable small amount of code. If you need the format flags
(don't know in what contexts you want to use it) it already gets
complicated. Reimplementing floating-point printing is, ehm,
challenging. Not many people did it successfully. It took me about 3-4
weeks full-time (>14h a day) to write both reading and writing
functions. Plus about 10 bug fixes in the following now 7 years the
code exists. And the necessary code is, again depending on the quality
you want to achieve, really big.
If you want to do the work go ahead. But make sure that if the code
isn't needed (as in glbic 2.3) it doesn't get used. The system library
code is almost certainly be better and sharing is adding on top of this.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20020404/5cb69ee3/attachment.sig>
More information about the Libstdc++
mailing list