Boost C++ Libraries: Ticket #4095: array subscript is above array bounds warning https://svn.boost.org/trac10/ticket/4095 <p> I am seeing this warning while running <code>../bjam</code> from within the <code>tools</code> directory: </p> <pre class="wiki">gcc.compile.c++ ../bin.v2/libs/test/build/gcc-4.3.2/release/link-static/debug.o In file included from ../libs/test/src/debug.cpp:16: /usr/include/c++/4.3/bits/stl_algo.h: In function `char* boost::debug::&lt;unnamed&gt;::prepare_window_title(const boost::debug::dbg_startup_info&amp;)': /usr/include/c++/4.3/bits/stl_algo.h:190: warning: array subscript is above array bounds </pre><p> I would normally ignore such things, as it's "just a warning".. but this seems like the kind of warning which should really be an error. </p> <p> Replace the "--" with a dot in my email, of course. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4095 Trac 1.4.3 Steven Watanabe Sat, 17 Apr 2010 18:23:32 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4095#comment:1 https://svn.boost.org/trac10/ticket/4095#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> This is a spurious warning caused by loop unrolling in std::find. There's nothing we can do about it. </p> Ticket anonymous Thu, 06 Oct 2011 21:03:42 GMT <link>https://svn.boost.org/trac10/ticket/4095#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4095#comment:2</guid> <description> <p> Possible workaround if you're stuck with a broken compiler: </p> <pre class="wiki"> $ diff -u boost_1_47_0/boost/test/impl/debug.ipp install_1_47_0/include/boost/test/impl/debug.ipp --- boost_1_47_0/boost/test/impl/debug.ipp 2011-10-06 17:00:22.102991319 -0400 +++ install_1_47_0/include/boost/test/impl/debug.ipp 2011-10-06 17:00:14.483359431 -0400 @@ -307,7 +307,8 @@ static char title_str[50]; - str_t path_sep( "\\/" ); + //str_t path_sep( "\\/" ); + const std::string path_sep( "\\/" ); str_t::iterator it = unit_test::find_last_of( dsi.binary_path.begin(), dsi.binary_path.end(), path_sep.begin(), path_sep.end() ); </pre> </description> <category>Ticket</category> </item> </channel> </rss>