Boost C++ Libraries: Ticket #7263: regex_traits [-Wnarrowing] https://svn.boost.org/trac10/ticket/7263 <p> Boost 1.51 build issue for gcc 4.7.1/C++11 enabled. Issue repeats many times. </p> <p> qcc.compile.c++ D:\boostBuild_QCC_1_51_0\boost\bin.v2\libs\regex\build\qcc\release\link-static\target-os-qnxnto\threadapi-pthread\threading-multi\cpp_regex_traits.o In file included from ./boost/regex/v4/regex_traits.hpp:39:0, </p> <blockquote> <p> from ./boost/regex/regex_traits.hpp:27, from libs\regex\build\..\src\cpp_regex_traits.cpp:22: </p> </blockquote> <p> ./boost/regex/v4/cpp_regex_traits.hpp: In instantiation of 'static boost::static_mutex&amp; boost::cpp_regex_traits&lt;charT&gt;::get_mutex_inst() [with charT = char]': ./boost/regex/v4/cpp_regex_traits.hpp:1059:49: required from 'static std::string boost::cpp_regex_traits&lt;charT&gt;::get_catalog_name() [with charT = char; std::string = std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;]' libs\regex\build\..\src\cpp_regex_traits.cpp:44:49: required from here ./boost/regex/v4/cpp_regex_traits.hpp:1069:34: warning: narrowing conversion of '2147483648u' from 'unsigned int' to 'int' inside { } [-Wnarrowing] </p> <p> ================= BJAM ================== </p> <p> bjam -a -q -j4 --prefix=%DRIVE%\boost --build-type=minimal --build-dir=%DRIVE%\boostBuild_QCC_%BOOSTVER% --layout=system toolset=qcc target-os=qnxnto threadapi=pthread --variant=release link=static threading=multi runtime-link=shared cxxflags="-DFD_SETSIZE=2048 -march=k8-sse3 -mtune=k8-sse3 -mmmx -msse3 -mfpmath=sse -mno-3dnow -mstackrealign -Wc,-fPIC,-fnothrow-opt,-std=c++11,-std=gnu++11" --without-context --without-mpi --without-python install &gt;build.log 2&gt;&amp;1 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7263 Trac 1.4.3 steve.lemay@… Wed, 22 Aug 2012 23:50:43 GMT attachment set https://svn.boost.org/trac10/ticket/7263 https://svn.boost.org/trac10/ticket/7263 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">build_log.zip</span> </li> </ul> <p> build output log </p> Ticket John Maddock Wed, 28 Nov 2012 12:59:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7263#comment:1 https://svn.boost.org/trac10/ticket/7263#comment:1 <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">wontfix</span> </li> </ul> <p> I don't think there's anything we can do to fix this: the warning comes from assigning PTHREAD_MUTEX_INITIALIZER to a pthread_mutex_t. So since the constant that generates the warning is defined in pthread.h I don't see what we can do :-( </p> <p> If you can figure out a patch that would fix this then please do reopen. </p> Ticket