This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error
- From: "paolo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2003 17:22:05 -0000
- Subject: [Bug libstdc++/12791] New: _M_extract_num returns a wrong __beg in case of error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12791
Summary: _M_extract_num returns a wrong __beg in case of error
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: paolo at gcc dot gnu dot org
ReportedBy: paolo at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: Any
It looks like time_get::_M_extract_num don't do the right thing wrt the final
value of __beg in case of error: the standard mandates that in case of error the
returned iterator points immediately beyond the last _character_ consumed as
part of a valid date value, but _M_extract_num checks only that the single chars
are digits and increments __beg, checking only _at the end_ the complete number vs
__min and __max!