Opened 8 years ago

Closed 8 years ago

#3734 closed Bugs (fixed)

xpressive sregex::compile fails to compile with gcc 4.1

Reported by: anonymous Owned by: Eric Niebler
Milestone: Boost 1.42.0 Component: xpressive
Version: Boost 1.41.0 Severity: Showstopper
Keywords: Cc:


I recently upgrade to boost 1.41 (was previously 1.40). After the upgrade, the following code does not compile:

#include <boost/xpressive/xpressive.hpp>

int main(int argc, char * argv[])
    boost::xpressive::sregex rex = boost::xpressive::sregex::compile("test");
    return 0;

Here is the compiler error output:

...found 1219 targets...
...updating 6 targets...
gcc.compile.c++ build/gcc-4.1/debug/main.o
cc1plus: warnings being treated as errors
/home/acn/Develop/newtec_repository/boost-1.41.0-2434/gcc-4.1/include/boost/proto/expr.hpp: In function ‘boost::proto::exprns_::expr<Tag, boost::proto::argsns_::term<Arg0>, 0l> boost::proto::detail::make_terminal(T&, boost::proto::exprns_::expr<Tag, boost::proto::argsns_::term<Arg0>, 0l>*) [with T = int, Tag = boost::proto::tag::terminal, Arg0 = boost::xpressive::detail::mark_placeholder]’:
/home/acn/Develop/newtec_repository/boost-1.41.0-2434/gcc-4.1/include/boost/proto/expr.hpp:252:   instantiated from ‘static const boost::proto::exprns_::expr<Tag, boost::proto::argsns_::term<T>, 0l> boost::proto::exprns_::expr<Tag, boost::proto::argsns_::term<T>, 0l>::make(A0&) [with A0 = int, Tag = boost::proto::tag::terminal, Arg0 = boost::xpressive::detail::mark_placeholder]’
/home/acn/Develop/newtec_repository/boost-1.41.0-2434/gcc-4.1/include/boost/xpressive/regex_primitives.hpp:547:   instantiated from here
/home/acn/Develop/newtec_repository/boost-1.41.0-2434/gcc-4.1/include/boost/proto/expr.hpp:78: warning: missing braces around initializer for ‘boost::xpressive::detail::mark_placeholder’

    "g++-4.1"  -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -Werror -g -fPIC -Wno-long-long   -I"/home/acn/Develop/newtec_repository/boost-1.41.0-2434/gcc-4.1/include" -I"build/gcc-4.1/debug" -c -o "build/gcc-4.1/debug/main.o" "/home/acn/Develop/eclipse_workspace/trunk/sandbox/concept/src/cpp/main.cpp"

...failed gcc.compile.c++ build/gcc-4.1/debug/main.o...
...failed updating 1 target...

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by anonymous

Component: Nonexpressive

comment:2 Changed 8 years ago by Eric Niebler

(In [58323]) eliminate gcc warning in mark_tag constructor, code reorg, references #3734

comment:3 Changed 8 years ago by Eric Niebler

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Eric Niebler.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.