Boost C++ Libraries: Ticket #3734: xpressive sregex::compile fails to compile with gcc 4.1 https://svn.boost.org/trac10/ticket/3734 <p> I recently upgrade to boost 1.41 (was previously 1.40). After the upgrade, the following code does not compile: </p> <pre class="wiki">#include &lt;boost/xpressive/xpressive.hpp&gt; int main(int argc, char * argv[]) { boost::xpressive::sregex rex = boost::xpressive::sregex::compile("test"); return 0; } </pre><p> Here is the compiler error output: </p> <pre class="wiki">...patience... ...patience... ...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&lt;Tag, boost::proto::argsns_::term&lt;Arg0&gt;, 0l&gt; boost::proto::detail::make_terminal(T&amp;, boost::proto::exprns_::expr&lt;Tag, boost::proto::argsns_::term&lt;Arg0&gt;, 0l&gt;*) [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&lt;Tag, boost::proto::argsns_::term&lt;T&gt;, 0l&gt; boost::proto::exprns_::expr&lt;Tag, boost::proto::argsns_::term&lt;T&gt;, 0l&gt;::make(A0&amp;) [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... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3734 Trac 1.4.3 anonymous Fri, 11 Dec 2009 16:00:46 GMT component changed https://svn.boost.org/trac10/ticket/3734#comment:1 https://svn.boost.org/trac10/ticket/3734#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">xpressive</span> </li> </ul> Ticket Eric Niebler Sat, 12 Dec 2009 10:23:04 GMT <link>https://svn.boost.org/trac10/ticket/3734#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3734#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58323" title="eliminate gcc warning in mark_tag constructor, code reorg, references #3734">[58323]</a>) eliminate gcc warning in mark_tag constructor, code reorg, references <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3734" title="#3734: Bugs: xpressive sregex::compile fails to compile with gcc 4.1 (closed: fixed)">#3734</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Tue, 05 Jan 2010 01:40:24 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3734#comment:3 https://svn.boost.org/trac10/ticket/3734#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> Ticket