The current revision of the code (r4589) fails to compile with gcc 4.4 when
using -O2 and -O3 while *not* defining NDEBUG:
cc1plus: warnings being treated as errors
landmarks/landmarks_graph.cc: In member function βint
LandmarksGraph::loop_acyclic_graph(LandmarkNode&,
__gnu_cxx::hash_set<LandmarkNode*, hash_pointer,
std::equal_to<LandmarkNode*>, std::allocator<LandmarkNode*> >&)β:
landmarks/landmarks_graph.cc:909: error: dereferencing pointer β<anonymous>β
does break strict-aliasing rules
/usr/include/c++/4.4/bits/stl_list.h:138: note: initialized from here
make: *** [obj/landmarks/landmarks_graph.o] Error 1
I remember seeing this before; I think there's an assertion there that the
optimizer gets confused about. This doesn't affect us right now because we only
define -O3 together with NDEBUG, but it tripped me up while I was trying out
various optimization options related to issue85.
|