Boost C++ Libraries: Ticket #9115: Warnings in mersenne twister and lagged fibonacci with -Wshadow on clang https://svn.boost.org/trac10/ticket/9115 <pre class="wiki">/home/nt2/dev/boost/trunk/boost/random/mersenne_twister.hpp:237:59: warning: declaration shadows a field of 'mersenne_twister_engine&lt;UIntType, w, n, m, r, a, u, d, s, b, t, c, l, f&gt;' [-Wshadow] friend bool operator==(const mersenne_twister_engine&amp; x, ^ /home/nt2/dev/boost/trunk/boost/random/mersenne_twister.hpp:376:14: note: previous declaration is here UIntType x[n]; ^ /home/nt2/dev/boost/trunk/boost/random/mersenne_twister.hpp:247:59: warning: declaration shadows a field of 'mersenne_twister_engine&lt;UIntType, w, n, m, r, a, u, d, s, b, t, c, l, f&gt;' [-Wshadow] friend bool operator!=(const mersenne_twister_engine&amp; x, ^ /home/nt2/dev/boost/trunk/boost/random/mersenne_twister.hpp:376:14: note: previous declaration is here UIntType x[n]; ^ In file included from /home/nt2/dev/nt2/modules/core/random/src/rand/randstream.cpp:10: In file included from /home/nt2/dev/nt2/modules/core/random/include/nt2/core/utility/randstream.hpp:14: /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:146:26: warning: declaration shadows a field of 'lagged_fibonacci_engine&lt;UIntType, w, p, q&gt;' [-Wshadow] for(unsigned int i = 0; i &lt; f.long_lag; ++i) ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:180:18: note: previous declaration is here unsigned int i; ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:157:26: warning: declaration shadows a field of 'lagged_fibonacci_engine&lt;UIntType, w, p, q&gt;' [-Wshadow] for(unsigned int i = 0; i &lt; f.long_lag; ++i) ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:180:18: note: previous declaration is here unsigned int i; ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:166:68: warning: declaration shadows a field of 'lagged_fibonacci_engine&lt;UIntType, w, p, q&gt;' [-Wshadow] BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_engine, x, y) ^ /home/nt2/dev/boost/trunk/boost/random/detail/operators.hpp:75:37: note: expanded from macro 'BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR' friend bool operator==(const T&amp; lhs, const T&amp; rhs) ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:181:14: note: previous declaration is here UIntType x[long_lag]; ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:357:26: warning: declaration shadows a field of 'lagged_fibonacci_01_engine&lt;RealType, w, p, q&gt;' [-Wshadow] for(unsigned int i = 0; i &lt; f.long_lag; ++i) ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:399:18: note: previous declaration is here unsigned int i; ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:369:26: warning: declaration shadows a field of 'lagged_fibonacci_01_engine&lt;RealType, w, p, q&gt;' [-Wshadow] for(unsigned int i = 0; i &lt; f.long_lag; ++i) { ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:399:18: note: previous declaration is here unsigned int i; ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:381:71: warning: declaration shadows a field of 'lagged_fibonacci_01_engine&lt;RealType, w, p, q&gt;' [-Wshadow] BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(lagged_fibonacci_01_engine, x, y) ^ /home/nt2/dev/boost/trunk/boost/random/detail/operators.hpp:75:37: note: expanded from macro 'BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR' friend bool operator==(const T&amp; lhs, const T&amp; rhs) ^ /home/nt2/dev/boost/trunk/boost/random/lagged_fibonacci.hpp:400:14: note: previous declaration is here RealType x[long_lag]; ^ 8 warnings generated. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9115 Trac 1.4.3 Mathias Gaunard Sat, 14 Sep 2013 12:44:59 GMT description changed https://svn.boost.org/trac10/ticket/9115#comment:1 https://svn.boost.org/trac10/ticket/9115#comment:1 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/9115?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket Mathias Gaunard Mon, 14 Oct 2013 11:37:02 GMT attachment set https://svn.boost.org/trac10/ticket/9115 https://svn.boost.org/trac10/ticket/9115 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_random_shadow_warning_fix.diff</span> </li> </ul> Ticket Mathias Gaunard Tue, 15 Oct 2013 14:08:59 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9115#comment:2 https://svn.boost.org/trac10/ticket/9115#comment:2 <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/86321" title="random: avoid generating warnings with -Wshadow, fix #9115">[86321]</a>) random: avoid generating warnings with -Wshadow, fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/9115" title="#9115: Bugs: Warnings in mersenne twister and lagged fibonacci with -Wshadow on clang (closed: fixed)">#9115</a> </p> Ticket Mathias Gaunard Tue, 15 Oct 2013 14:10:13 GMT <link>https://svn.boost.org/trac10/ticket/9115#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9115#comment:3</guid> <description> <p> Checked in trunk revision 86321 </p> <p> leaving open until merged to release </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mathias Gaunard</dc:creator> <pubDate>Tue, 15 Oct 2013 14:11:37 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/9115#comment:4 https://svn.boost.org/trac10/ticket/9115#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> Ticket Steven Watanabe Tue, 11 Mar 2014 18:44:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9115#comment:5 https://svn.boost.org/trac10/ticket/9115#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I merged this to master. </p> Ticket