[Bug libstdc++/12791] _M_extract_num returns a wrong __beg in case of error

cvs-commit at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Aug 1 16:50:00 GMT 2004


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-01 16:50 -------
Subject: Bug 12791

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	hammer-3_3-branch
Changes by:	paolo@gcc.gnu.org	2004-08-01 16:50:24

Modified files:
	libstdc++-v3   : ChangeLog.hammer 
	libstdc++-v3/include/bits: locale_facets.tcc 

Log message:
	2004-08-01  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/12791
	* include/bits/locale_facets.tcc (time_get::_M_extract_num):
	Rewrite, stop the parsing as soon as a digit cannot possibly
	lead to a final number within the bounds; otherwise, simplify,
	avoiding __ctype.is() and atoi().
	
	* include/bits/locale_facets.tcc (time_get::_M_extract_via_format):
	Minor tweak: a 4-digit integer cannot be bigger than 9999.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.hammer.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.1.2.30&r2=1.1.2.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.82.2.23&r2=1.82.2.24



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791



More information about the Gcc-bugs mailing list