Boost C++ Libraries: Ticket #4015: [PATCH] boost/program_options gcc warning cleanup https://svn.boost.org/trac10/ticket/4015 <p> Patch to clean up excessive gcc 4.x warning barf. </p> <p> To reproduce, compile any program_options-using program with: -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Werror=return-type -Wextra -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wno-multichar -Wpacked -Wredundant-decls -Wshadow -Wswitch-default -Wundef -Wwrite-strings -Wctor-dtor-privacy -Werror=non-virtual-dtor -Woverloaded-virtual </p> <p> Attached patch fixes the issue. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4015 Trac 1.4.3 Tatu Kilappa <tatu.kilappa@…> Mon, 15 Mar 2010 20:55:40 GMT attachment set https://svn.boost.org/trac10/ticket/4015 https://svn.boost.org/trac10/ticket/4015 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_program_options_gcc_warning_cleanup.diff</span> </li> </ul> Ticket Vladimir Prus Mon, 15 Mar 2010 21:09:04 GMT <link>https://svn.boost.org/trac10/ticket/4015#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4015#comment:1</guid> <description> <p> Sorry, but I think that whatever warning option causes gcc to warn about "v(v)" style of member initializers is a broken warning option. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Mon, 15 Mar 2010 21:18:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4015#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4015#comment:2</guid> <description> <p> I'm guessing that it's -Wshadow. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Mon, 15 Mar 2010 21:24:52 GMT</pubDate> <title>description changed https://svn.boost.org/trac10/ticket/4015#comment:3 https://svn.boost.org/trac10/ticket/4015#comment:3 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/4015?action=diff&amp;version=3">diff</a>) </li> </ul> <p> Really? I would have guessed -Winit_self. </p> Ticket Steven Watanabe Mon, 15 Mar 2010 21:32:05 GMT <link>https://svn.boost.org/trac10/ticket/4015#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4015#comment:4</guid> <description> <p> No, they're different v's. There's both a member and a parameter called v. </p> </description> <category>Ticket</category> </item> <item> <author>Tatu Kilappa <tatu.kilappa@…></author> <pubDate>Tue, 16 Mar 2010 19:50:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4015#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4015#comment:5</guid> <description> <p> The option causing the warning is indeed -Wshadow. The warnings are caused simply by function parameters that are of the same name as class members. </p> <p> I'm using that option all the time to prevent myself from doing anything stupid, but its Vladimir's library and if he disagrees, then that's pretty much that. Then just conclude this with 'wontfix'. </p> <p> And if thus, is there a GCC option that can have it ignore warnings inside certain headers or is the only option to do a lot of script magic? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Wed, 26 May 2010 10:40:37 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4015#comment:6 https://svn.boost.org/trac10/ticket/4015#comment:6 <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/62236" title="Fix -Wshadow warnings. Closes #4015. Patch from Tatu Kilappa. ">[62236]</a>) Fix -Wshadow warnings. Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4015" title="#4015: Patches: [PATCH] boost/program_options gcc warning cleanup (closed: fixed)">#4015</a>. Patch from Tatu Kilappa. </p> Ticket Vladimir Prus Wed, 26 May 2010 10:42:22 GMT <link>https://svn.boost.org/trac10/ticket/4015#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4015#comment:7</guid> <description> <p> While I hate warning options that are broken, -Wshadow seems generally useful to catch issues, so I've applied the patch. </p> </description> <category>Ticket</category> </item> <item> <author>tatu.kilappa@…</author> <pubDate>Thu, 27 May 2010 18:07:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4015#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4015#comment:8</guid> <description> <p> Thanks, I appreciate this. </p> </description> <category>Ticket</category> </item> </channel> </rss>