Boost C++ Libraries: Ticket #12172: Warning in ublas/matrix_expression.hpp from GCC 6.1.0 -Wmisleading-indentation https://svn.boost.org/trac10/ticket/12172 <p> When I compile with "-Wall -Wextra -Werror", I get: </p> <p> .../boost/numeric/ublas/matrix_expression.hpp:2224:17: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] </p> <blockquote> <p> if (it2_ != it2_end_) <sup>~ </sup></p> </blockquote> <p> .../boost/numeric/ublas/matrix_expression.hpp:2227:21: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ </p> <blockquote> <p> if (it2_ != it2_end_) { </p> </blockquote> <p> This appears to be a valid warning, and lines 2227 and 2228 should be un-indented by one level. Assuming this is not a real bug, that is. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12172 Trac 1.4.3 jzulauf@… Thu, 28 Jul 2016 01:31:49 GMT <link>https://svn.boost.org/trac10/ticket/12172#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12172#comment:1</guid> <description> <p> not only is that a valid warning. The logical guarding of the if block differs in the increment function from the matching code in the "decrement" function below -- this probably needs algorithmic review, not just indentation fixing. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 25 Oct 2016 19:54:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12172#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12172#comment:2</guid> <description> <p> Same in 6.2.0 </p> </description> <category>Ticket</category> </item> <item> <author>khalil.fazal@…</author> <pubDate>Wed, 23 Nov 2016 02:45:51 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/12172 https://svn.boost.org/trac10/ticket/12172 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">12172.patch</span> </li> </ul> <p> proposed patch for bug<a class="new ticket" href="https://svn.boost.org/trac10/ticket/12172" title="#12172: Bugs: Warning in ublas/matrix_expression.hpp from GCC 6.1.0 ... (new)">#12172</a> </p> Ticket khalil.fazal@… Wed, 23 Nov 2016 02:46:45 GMT <link>https://svn.boost.org/trac10/ticket/12172#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12172#comment:3</guid> <description> <p> are there any unit tests my change can be tested against? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 10 Jan 2017 23:20:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12172#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12172#comment:4</guid> <description> <p> By pure coincidence, the two possible interpretations are equivalent. The condition being tested by the two if statements is the same, so the way it is written now is slightly less efficient, but still produces the right result. The patch proposed by khalil is probably what the original author intended. </p> <p> In other words, you don't need to worry about regressions. </p> </description> <category>Ticket</category> </item> <item> <author>joshua.strodtbeck@…</author> <pubDate>Tue, 01 Aug 2017 18:34:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12172#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12172#comment:5</guid> <description> <p> khalil's patch is consistent with 1.57. Best to find out why it changed in the first place. </p> </description> <category>Ticket</category> </item> </channel> </rss>