Boost C++ Libraries: Ticket #5892: Why using pragma instead of fixing simple warnings? https://svn.boost.org/trac10/ticket/5892 <p> In boost/exception/detail/error_info_impl.hpp, a gnu pragma was added to hide a warning that seems to be simple to fix (changing a member function argument name so it does not hide a member with the same name). </p> <p> I can understand using pragma for things which are complex and will take time and effort to fix, but should we use the pragma for simple cases too? </p> <p> I don't think that was the intent of the document: <a class="ext-link" href="https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines"><span class="icon">​</span>https://svn.boost.org/trac/boost/wiki/Guidelines/WarningsGuidelines</a>. </p> <p> This may seem cosmetic, but for the long term it could impact the overall quality if pragma proliferate and hide real issues. </p> <p> Thanks, Christophe </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5892 Trac 1.4.3 christophe vial <cvial@…> Tue, 13 Sep 2011 01:18:32 GMT <link>https://svn.boost.org/trac10/ticket/5892#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5892#comment:1</guid> <description> <p> Actually the issue is of course the combination of </p> <blockquote> <p> boost/exception/detail/error_info_impl.hpp </p> </blockquote> <p> and </p> <blockquote> <p> boost/exception/info.hpp </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>Emil Dotchevski</dc:creator> <pubDate>Tue, 13 Sep 2011 02:53:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5892#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5892#comment:2</guid> <description> <p> Replying to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5892" title="#5892: Support Requests: Why using pragma instead of fixing simple warnings? (closed: wontfix)">christophe vial &lt;cvial@…&gt;</a>: </p> <blockquote class="citation"> <p> &lt;snip&gt; This may seem cosmetic, but for the long term it could impact the overall quality if pragma proliferate and hide real issues. </p> </blockquote> <p> In practice, it is impossible to "fix" all warnings on all platforms, plus some warnings fly in the face of conscious design decisions and thus can't be "fixed" without compromising the design. A "good" fix would be to disable specific warnings, but GCC does not support that. The only alternative is to disable all warnings, and rely on an extensive framework of tests to ensure correct behavior. </p> <p> Emil </p> </description> <category>Ticket</category> </item> <item> <author>christophe vial <cvial@…></author> <pubDate>Tue, 13 Sep 2011 06:34:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5892#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5892#comment:3</guid> <description> <p> As I said, I do understand that it is not possible in all the cases. </p> <p> But is there any guidelines about which warning should be fixed and which should be hidden? </p> <blockquote> <p> boost/include/boost_1_41_0/boost/exception/info.hpp:28: error: declaration of 'value' shadows a member of 'this' </p> </blockquote> <p> This one seems quite simple enough to fix. </p> <p> Thanks, Christophe </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Emil Dotchevski</dc:creator> <pubDate>Tue, 13 Sep 2011 18:05:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5892#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5892#comment:4</guid> <description> <p> I am trying to provide a warning-free experience for the user. If you see warnings, please provide compiler version and exact command line and I'll do my best to remove the warnings. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Emil Dotchevski</dc:creator> <pubDate>Wed, 26 Oct 2016 18:54:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5892#comment:5 https://svn.boost.org/trac10/ticket/5892#comment:5 <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> Ticket