Boost C++ Libraries: Ticket #3718: boost regex library generates shadowed variable/member warnings https://svn.boost.org/trac10/ticket/3718 <p> Including boost/regex.h with warnings for shadowed variables and warnings enabled generates warnings. The output below is generated by gcc with -Wshadow: </p> <p> In file included from <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/regex.hpp:73, </em></p> <blockquote> <p> from <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex.hpp:31, from evaluate/LEvaluator.cpp:15: </em></p> </blockquote> <p> <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp: In member function 'bool boost::re_detail::basic_regex_parser&lt;charT, traits&gt;::parse_repeat(size_t, size_t)': </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:971: warning: declaration of 'jmp' shadows a previous local <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:956: warning: shadowed declaration is here </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp: In member function 'bool boost::re_detail::basic_regex_parser&lt;charT, traits&gt;::parse_perl_extension()': <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:1961: warning: declaration of 'v' shadows a previous local </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/basic_regex_parser.hpp:1834: warning: shadowed declaration is here In file included from <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/regex.hpp:82, </em></p> <blockquote> <p> from <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex.hpp:31, from evaluate/LEvaluator.cpp:15: </em></p> </blockquote> <p> <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits&lt;<a class="missing wiki">BidiIterator</a>&gt;::difference_type boost::match_results&lt;<a class="missing wiki">BidiIterator</a>, Allocator&gt;::length(const typename boost::re_detail::regex_iterator_traits&lt;<a class="missing wiki">BidiIterator</a>&gt;::value_type*) const': </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:108: warning: declaration of 'end' shadows a member of 'this' <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits&lt;<a class="missing wiki">BidiIterator</a>&gt;::difference_type boost::match_results&lt;<a class="missing wiki">BidiIterator</a>, Allocator&gt;::length(const charT*) const': </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:115: warning: declaration of 'end' shadows a member of 'this' <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits&lt;<a class="missing wiki">BidiIterator</a>&gt;::difference_type boost::match_results&lt;<a class="missing wiki">BidiIterator</a>, Allocator&gt;::position(const typename boost::re_detail::regex_iterator_traits&lt;<a class="missing wiki">BidiIterator</a>&gt;::value_type*) const': </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:139: warning: declaration of 'end' shadows a member of 'this' <em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp: In member function 'typename boost::re_detail::regex_iterator_traits&lt;<a class="missing wiki">BidiIterator</a>&gt;::difference_type boost::match_results&lt;<a class="missing wiki">BidiIterator</a>, Allocator&gt;::position(const charT*) const': </em>mathworks/hub/3rdparty/R2010b/147024/glnxa64/boost/include/boost/regex/v4/match_results.hpp:146: warning: declaration of 'end' shadows a member of 'this' </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3718 Trac 1.4.3 Marshall Clow Fri, 04 Dec 2009 22:25:04 GMT owner set https://svn.boost.org/trac10/ticket/3718#comment:1 https://svn.boost.org/trac10/ticket/3718#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">John Maddock</span> </li> </ul> Ticket John Maddock Sat, 05 Dec 2009 12:09:32 GMT component changed https://svn.boost.org/trac10/ticket/3718#comment:2 https://svn.boost.org/trac10/ticket/3718#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">regex</span> </li> </ul> Ticket John Maddock Sat, 05 Dec 2009 12:15:30 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3718#comment:3 https://svn.boost.org/trac10/ticket/3718#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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58154" title="Fix -Wshadow gcc warnings. Update and regenerate docs. Fixes #3718.">[58154]</a>) Fix -Wshadow gcc warnings. Update and regenerate docs. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3718" title="#3718: Bugs: boost regex library generates shadowed variable/member warnings (closed: fixed)">#3718</a>. </p> Ticket