[Patch] Fix libstdc++/12791
Paolo Carlini
pcarlini@suse.de
Tue Dec 2 21:48:00 GMT 2003
Hi,
it took me some time, but I find the result quite satisfying.
The new _M_extract_num is pretty general, only the initialization
of __mult is limited for the moment to __len = 1, 2, 4, the values
actually used in the library, otherwise (by just adding a pow() call
or something like that) the code is general and works ok up to the
the size of the int type.
This implies, among other things, that I didn't consider replacing
the division (__mult /= 10 -> __max *= 10, __min *= 10) neither I
have a special case for __len == 2 (the most common value).
Since we are now avoiding basic_string and atoi() the final code
is anyway pretty fast (besides not being affected by the iterator
bug, of course ;)
Please have a look: tomorrow (italian time) I mean to commit the
work (or variants of it ;)
Tested x86-linux, as usual.
Paolo.
///////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_12791
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031202/f7dec724/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_12791
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031202/f7dec724/attachment-0001.ksh>
More information about the Libstdc++
mailing list