[Boost-bugs] [Boost C++ Libraries] #9879: compiler_status fails to compile in C++98 mode

Subject: [Boost-bugs] [Boost C++ Libraries] #9879: compiler_status fails to compile in C++98 mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-13 12:17:11


#9879: compiler_status fails to compile in C++98 mode
----------------------------+--------------------------
 Reporter: Arfrever.FTA@… | Type: Bugs
   Status: new | Milestone: Boost 1.56.0
Component: None | Version: Boost 1.55.0
 Severity: Regression | Keywords:
----------------------------+--------------------------
 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.

 {{{
 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&)’:
 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() && 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() && isdigit(*itr);
 ++itr)
                     ^
 regression/src/compiler_status.cpp:131:41: error: expected ‘;’ before
 â€˜itr’
            for(auto itr = ln.begin()+10; itr != ln.end() && 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 & 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 & 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 & native_ecat = system_category();
                                     ^
 ...skipped <pregression/build/bin/gcc-4.8/gentoorelease/boost.locale.icu-
 off/link-static/pch-off/threading-multi>compiler_status for lack of
 <pregression/build/bin/gcc-4.8/gentoorelease/boost.locale.icu-off/link-
 static/pch-off/threading-multi>compiler_status.o...
 ...failed updating 1 target...
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9879>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC