[Bug c++/30633] New: Weird uninit in Boost `add_edge'
Ran across this while using the Boost graph package. Test program: -- #include #include namespace boost { enum vertex_subgraph_t { vertex_subgraph }; BOOST_INSTALL_PROPERTY(vertex, subgraph); enum vertex_order_t { vertex_order }; BOOST_INSTALL_PROPERTY(vertex, order); enum edge_back_t { edge_back }; BOOST_INSTALL_PROPERTY(edge, back); }; typedef boost::property > > > VertexProperty; typedef boost::property EdgeProperties; typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, VertexProperty, EdgeProperties > FlowLayoutGraph; typedef boost::graph_traits< FlowLayoutGraph >::vertex_descriptor vertex_descriptor; void break_gcc(FlowLayoutGraph& m_graph, vertex_descriptor v1, vertex_descriptor v2) { add_edge(v1, v2, m_graph); } Obtain and unpack Boost 1.33.1. Compile the above with a command like: g++ -c -I/path/to/boost_1_33_1 -O -Wuninitialized filename.cpp You should see a message complaining that `p$m_value' is used uninitialized. (This is, as you probably already realize, a name generated internally by g++; there is no such variable in the source.) -- Summary: Weird uninit in Boost `add_edge' Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Scott at coral8 dot com GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30633
[Bug c++/30633] Weird uninit in Boost `add_edge'
--- Comment #1 from Scott at coral8 dot com 2007-02-05 23:40 --- I tried 4.1.2 RC1 -- the bug is still present. -- Scott at coral8 dot com changed: What|Removed |Added Known to fail||4.1.1 4.1.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30633
[Bug c++/30633] Weird uninit in Boost `add_edge'
--- Comment #3 from Scott at coral8 dot com 2007-02-06 00:17 --- Actually, I didn't look closely enough; the error generated by 4.1.2 RC1 is different: /usr/local/gcc-4.1.2/lib/gcc/i386-pc-solaris2.11/4.1.2/../../../../include/c++/4.1.2/ext/new_allocator.h: In function void break_gcc(FlowLayoutGraph&, vertex_descriptor, vertex_descriptor): /usr/local/gcc-4.1.2/lib/gcc/i386-pc-solaris2.11/4.1.2/../../../../include/c++/4.1.2/ext/new_allocator.h:104: warning: p.boost::property::m_value is used uninitialized in this function -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30633
[Bug c++/30633] Weird uninit in Boost `add_edge'
--- Comment #4 from Scott at coral8 dot com 2007-02-06 00:21 --- Created an attachment (id=13010) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13010&action=view) Preprocessed source, as requested (gzipped) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30633
[Bug c++/30633] Weird uninit in Boost `add_edge'
--- Comment #6 from Scott at coral8 dot com 2007-02-06 01:01 --- Ah, very good. Thanks for taking a look at this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30633