Boost C++ Libraries: Ticket #6863: Clang warnings in basic_regex_creator.hpp https://svn.boost.org/trac10/ticket/6863 <p> Hi! I have the following warnings with </p> <p> $ clang -v clang version 3.2 (trunk) Target: x86_64-pc-linux-gnu Thread model: posix: </p> <p> In file included from /usr/include/boost-1_49/boost/regex.hpp:31: In file included from /usr/include/boost-1_49/boost/regex/v4/regex.hpp:70: /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1038:34: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] </p> <blockquote> <p> else if((state-&gt;type == syntax_element_long_set_rep)) </p> <blockquote> <p> <del></del><del></del><del></del><sup><del></del><del></del><del></del><del></del><del></del><del></del><del></del>~ </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: remove extraneous parentheses around the comparison to silence this warning </p> <blockquote> <p> else if((state-&gt;type == syntax_element_long_set_rep)) </p> <blockquote> <p> ~ <sup> ~ </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1038:34: note: use '=' to turn this equality comparison into an assignment </p> <blockquote> <p> else if((state-&gt;type == syntax_element_long_set_rep)) </p> <blockquote> <p> <sup>~ = </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1116:18: warning: array subscript is of type 'char' [-Wchar-subscripts] </p> <blockquote> <p> l_map<a class="missing wiki">\n</a> |= mask; </p> <blockquote> <p> <sup><del></del> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1117:18: warning: array subscript is of type 'char' [-Wchar-subscripts] </p> <blockquote> <p> l_map<a class="missing wiki">\r</a> |= mask; </p> <blockquote> <p> <sup><del></del> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1118:18: warning: array subscript is of type 'char' [-Wchar-subscripts] </p> <blockquote> <p> l_map<a class="missing wiki">\f</a> |= mask; </p> <blockquote> <p> <sup><del></del> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1305:18: warning: array subscript is of type 'char' [-Wchar-subscripts] </p> <blockquote> <p> l_map<a class="missing wiki">\n</a> |= mask; </p> <blockquote> <p> <sup><del></del> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1306:18: warning: array subscript is of type 'char' [-Wchar-subscripts] </p> <blockquote> <p> l_map<a class="missing wiki">\r</a> |= mask; </p> <blockquote> <p> <sup><del></del> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1341:28: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] </p> <blockquote> <p> if((p-&gt;type == syntax_element_recurse)) </p> <blockquote> <p> <del></del><del></del><sup><del></del><del></del><del></del><del></del><del></del><del></del> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: remove extraneous parentheses around the comparison to silence this warning </p> <blockquote> <p> if((p-&gt;type == syntax_element_recurse)) </p> <blockquote> <p> ~ <sup> ~ </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:1341:28: note: use '=' to turn this equality comparison into an assignment </p> <blockquote> <p> if((p-&gt;type == syntax_element_recurse)) </p> <blockquote> <p> <sup>~ = </sup></p> </blockquote> </blockquote> <hr /> <p> In file included from /usr/include/boost-1_49/boost/regex.hpp:31: In file included from /usr/include/boost-1_49/boost/regex/v4/regex.hpp:70: /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:528:13: warning: unused function 'char_less' [-Wunused-function] inline bool char_less&lt;char&gt;(char t1, char t2) </p> <blockquote> <p> <sup> </sup></p> </blockquote> <p> /usr/include/boost-1_49/boost/regex/v4/basic_regex_creator.hpp:533:13: warning: unused function 'char_less' [-Wunused-function] inline bool char_less&lt;signed char&gt;(signed char t1, signed char t2) </p> <blockquote> <p> <sup> </sup></p> </blockquote> <p> Are this boost problems or is clang to critical about this? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6863 Trac 1.4.3 John Maddock Sat, 12 May 2012 08:11:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6863#comment:1 https://svn.boost.org/trac10/ticket/6863#comment:1 <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/78431" title="Fix clang warnings. Fixes #6863.">[78431]</a>) Fix clang warnings. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6863" title="#6863: Bugs: Clang warnings in basic_regex_creator.hpp (closed: fixed)">#6863</a>. </p> Ticket John Maddock Tue, 15 May 2012 16:09:14 GMT <link>https://svn.boost.org/trac10/ticket/6863#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6863#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/78480" title="Fix some more GCC warnings. Fix previous warning suppression which ...">[78480]</a>) Fix some more GCC warnings. Fix previous warning suppression which broke tests with GCC. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6863" title="#6863: Bugs: Clang warnings in basic_regex_creator.hpp (closed: fixed)">#6863</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>