Ran across this while using the Boost graph package.  Test program:

----------------------
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>


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<boost::vertex_distance_t, int, 
        boost::property<boost::vertex_name_t, std::string,
        boost::property<boost::vertex_subgraph_t, int, 
        boost::property<boost::vertex_order_t, int > > > > VertexProperty;
typedef boost::property<boost::edge_back_t, bool > 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

Reply via email to