Boost C++ Libraries: Ticket #9879: compiler_status fails to compile in C++98 mode https://svn.boost.org/trac10/ticket/9879 <p> compiler_status fails to compile in C++98 mode (which is default in GCC). This problem is a regression introduced in Boost 1.55.0. This problem is absent in older versions of Boost (e.g. 1.54.0). I use GCC 4.8.2. </p> <pre class="wiki">gcc.compile.c++ regression/build/bin/gcc-4.8/gentoorelease/boost.locale.icu-off/link-static/pch-off/threading-multi/compiler_status.o "x86_64-pc-linux-gnu-g++" -ftemplate-depth-128 -march=core2 -O2 -fno-ident -frecord-gcc-switches -pipe -Wall -finline-functions -Wno-inline -Wall -pthread -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I".." -c -o "regression/build/bin/gcc-4.8/gentoorelease/boost.locale.icu-off/link-static/pch-off/threading-multi/compiler_status.o" "regression/src/compiler_status.cpp" regression/src/compiler_status.cpp: In function ‘std::string {anonymous}::revision(const boost::filesystem::path&amp;)’: regression/src/compiler_status.cpp:131:15: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat] for(auto itr = ln.begin()+10; itr != ln.end() &amp;&amp; isdigit(*itr); ++itr) ^ regression/src/compiler_status.cpp:131:20: error: ‘itr’ does not name a type for(auto itr = ln.begin()+10; itr != ln.end() &amp;&amp; isdigit(*itr); ++itr) ^ regression/src/compiler_status.cpp:131:41: error: expected ‘;’ before ‘itr’ for(auto itr = ln.begin()+10; itr != ln.end() &amp;&amp; isdigit(*itr); ++itr) ^ regression/src/compiler_status.cpp:131:41: error: ‘itr’ was not declared in this scope regression/src/compiler_status.cpp: In function ‘int cpp_main(int, char**)’: regression/src/compiler_status.cpp:1017:6: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] if (jamfile_path.empty()) ^ In file included from ../boost/filesystem/path_traits.hpp:23:0, from ../boost/filesystem/path.hpp:25, from ../boost/filesystem/operations.hpp:25, from regression/src/compiler_status.cpp:29: ../boost/system/error_code.hpp: At global scope: ../boost/system/error_code.hpp:222:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable] static const error_category &amp; posix_category = generic_category(); ^ ../boost/system/error_code.hpp:223:36: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable] static const error_category &amp; errno_ecat = generic_category(); ^ ../boost/system/error_code.hpp:224:36: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable] static const error_category &amp; native_ecat = system_category(); ^ ...skipped &lt;pregression/build/bin/gcc-4.8/gentoorelease/boost.locale.icu-off/link-static/pch-off/threading-multi&gt;compiler_status for lack of &lt;pregression/build/bin/gcc-4.8/gentoorelease/boost.locale.icu-off/link-static/pch-off/threading-multi&gt;compiler_status.o... ...failed updating 1 target... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9879 Trac 1.4.3 Arfrever.FTA@… Sun, 13 Apr 2014 12:20:37 GMT <link>https://svn.boost.org/trac10/ticket/9879#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9879#comment:1</guid> <description> <p> Potential fix: </p> <pre class="wiki">--- tools/regression/src/compiler_status.cpp +++ tools/regression/src/compiler_status.cpp @@ -128,7 +128,7 @@ string ln(line); if (ln.find("Revision: ") != string::npos) { - for(auto itr = ln.begin()+10; itr != ln.end() &amp;&amp; isdigit(*itr); ++itr) + for(string::iterator itr = ln.begin()+10; itr != ln.end() &amp;&amp; isdigit(*itr); ++itr) rev += *itr; } } </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 23 Apr 2014 11:02:13 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/9879#comment:2 https://svn.boost.org/trac10/ticket/9879#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">René Rivera</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Regression Testing</span> </li> </ul> Ticket René Rivera Fri, 02 Jan 2015 21:22:54 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9879#comment:3 https://svn.boost.org/trac10/ticket/9879#comment:3 <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">fixed</span> </li> </ul> <p> This is obsolete code now that we are using GIT. The new working code that compiles with C++98 is on the develop branch of the boostorg/regression repo. The old code will soon totally disappear soon. </p> Ticket