This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/19510] [4.0 regression] Warning using list iterators
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2005 21:02:17 -0000
- Subject: [Bug libstdc++/19510] [4.0 regression] Warning using list iterators
- References: <20050118201125.19510.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-01-18 21:02 -------
Subject: Re: New: [4.0 regression] Warning using list iterators
"reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Compiling the following code snippet with "-Wall -O3" using mainline
|
| ===============================================
| #include<vector>
| #include<list>
|
| std::vector<std::list<int>::iterator> v(1);
| ===============================================
|
| I get the following warning:
|
| /long_path/stl_construct.h: In function 'void
| __static_initialization_and_destruction_0(int, int)':
| /long_path/stl_construct.h:81: warning: 'SR.133' is used uninitialized in this
| function
|
| Apart from the strange variable name 'SR.133' the warning seems to be
| justified as the default constructor of _List_iterator does not initialize
| the pointer _M_node. _List_const_iterator has the same problem.
That strange warning would be greatly useful if SRA names were not
used. They make the diagnostic rather cryptic and noisy.
I think your patch is OK and should be applied.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19510