[Boost-bugs] [Boost C++ Libraries] #9544: gcc 4.9.0 -std=c++1y breakage

Subject: [Boost-bugs] [Boost C++ Libraries] #9544: gcc 4.9.0 -std=c++1y breakage
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-04 18:09:47


#9544: gcc 4.9.0 -std=c++1y breakage
------------------------------------+-------------------------
 Reporter: Peter A. Bigot <pab@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------------+-------------------------
 The program below fails to compile with development gcc in C++1y mode; it
 works in C++11 mode. I don't know whether this is a fault in gcc or in
 boost, but thought an early warning was worth providing. This is with the
 current super-project master branch; I believe it also fails on develop.

 {{{
 llc[900]$ cat /tmp/bre.cc
 #include <boost/regex.hpp>

 const boost::regex e("AB");

 llc[901]$ g++ --version
 g++ (GCC) 4.9.0 20140104 (experimental)
 Copyright (C) 2014 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions. There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.

 llc[902]$ g++ -std=c++11 -I/opt/boost -c /tmp/bre.cc
 llc[903]$ g++ -std=c++1y -I/opt/boost -c /tmp/bre.cc
 In file included from /opt/boost/boost/regex/v4/regex.hpp:70:0,
                  from /opt/boost/boost/regex.hpp:31,
                  from /tmp/bre.cc:1:
 /opt/boost/boost/regex/v4/basic_regex_creator.hpp: In member function
 â€˜boost::re_detail::re_literal*
 boost::re_detail::basic_regex_creator<charT,
 traits>::append_literal(charT)’:
 /opt/boost/boost/regex/v4/basic_regex_creator.hpp:347:24: error: lvalue
 required as increment operand
        ++(result->length);
                         ^
 In file included from /opt/boost/boost/regex/v4/regex.hpp:73:0,
                  from /opt/boost/boost/regex.hpp:31,
                  from /tmp/bre.cc:1:
 /opt/boost/boost/regex/v4/basic_regex_parser.hpp: In member function ‘bool
 boost::re_detail::basic_regex_parser<charT,
 traits>::parse_repeat(std::size_t, std::size_t)’:
 /opt/boost/boost/regex/v4/basic_regex_parser.hpp:974:21: error: lvalue
 required as decrement operand
        --(lit->length);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9544>
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:15 UTC