[Bug c++/25649] [4.2 regression] Bogus "uninitialized" warning
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jan 4 15:01:00 GMT 2006
------- Comment #3 from reichelt at gcc dot gnu dot org 2006-01-04 15:01 -------
Looks like the culprit is the following part of Paolo's patch:
+ operator>>(int& __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 118. basic_istream uses nonexistent num_get member functions.
+ long __l;
+ _M_extract(__l);
+ if (!this->fail())
+ {
+ if (numeric_limits<int>::min() <= __l
+ && __l <= numeric_limits<int>::max())
+ __n = __l;
+ else
+ this->setstate(ios_base::failbit);
+ }
+ return *this;
+ }
We really don't set __n in all cases here.
So the warning is justified.
Paolo. Could you please have a look?
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pcarlini at suse dot de
Component|libstdc++ |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25649
More information about the Gcc-bugs
mailing list