Boost C++ Libraries: Ticket #3556: Missing explicit braces to avoid ambiguous else clause https://svn.boost.org/trac10/ticket/3556 <p> While building Boost from current trunk (<a class="changeset" href="https://svn.boost.org/trac10/changeset/57126" title="Update the intel compile flags.">r57126</a>) using GCC 4.4.1 I'm getting the following warning for Boost Program Options: </p> <pre class="wiki">gcc.compile.c++ bin.v2/libs/program_options/build/gcc-4.4.1/release/link-static/threading-multi/options_description.o libs/program_options/src/options_description.cpp: In member function ‘boost::program_options::option_description::match_result boost::program_options::option_description::match(const std::string&amp;, bool) const’: libs/program_options/src/options_description.cpp:74: warning: suggest explicit braces to avoid ambiguous ‘else </pre><p> Patch adding the extra braces attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3556 Trac 1.4.3 mloskot <mateusz@…> Sat, 24 Oct 2009 13:31:00 GMT attachment set https://svn.boost.org/trac10/ticket/3556 https://svn.boost.org/trac10/ticket/3556 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">program_options-explicit-braces.patch</span> </li> </ul> <p> Patch with missing braces to avoid ambiguous else clause </p> Ticket mloskot <mateusz@…> Sat, 24 Oct 2009 13:33:13 GMT <link>https://svn.boost.org/trac10/ticket/3556#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3556#comment:1</guid> <description> <p> By the way, one more warning is reported. To not to make too much noise with new ticket, here it is: </p> <pre class="wiki">libs/program_options/src/value_semantic.cpp:175: warning: suggest parentheses around ‘&amp;&amp;’ within ‘||’ libs/program_options/src/value_semantic.cpp:190: warning: suggest parentheses around ‘&amp;&amp;’ within ‘|| </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sun, 01 Nov 2009 09:18:36 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3556#comment:2 https://svn.boost.org/trac10/ticket/3556#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/57270" title="Fix 'ambiguous else clause' compiler warning. Fixes #3556. Patch from ...">[57270]</a>) Fix 'ambiguous else clause' compiler warning. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3556" title="#3556: Bugs: Missing explicit braces to avoid ambiguous else clause (closed: fixed)">#3556</a>. </p> <p> Patch from Mateusz Loskot. </p> Ticket