Subject: [Boost-bugs] [Boost C++ Libraries] #5252: Remove extraneous parentheses around '==' if-expression
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-02 00:27:18
#5252: Remove extraneous parentheses around '==' if-expression
-------------------------------------+--------------------------------------
Reporter: chandlerc@⦠| Owner:
Type: Patches | Status: new
Milestone: To Be Determined | Component: None
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+--------------------------------------
Without this patch, Clang produces the following warning:
% clang++ -fsyntax-only -Wparentheses -I .
boost/date_time/gregorian_calendar.hpp
In file included from boost/date_time/gregorian_calendar.hpp:63:
./boost/date_time/gregorian_calendar.ipp:50:15: warning: equality
comparison with extraneous parentheses [-Wparentheses]
if ((week == 53)) {
~~~~~^~~~~
./boost/date_time/gregorian_calendar.ipp:50:15: note: use '=' to turn this
equality comparison into an assignment
if ((week == 53)) {
^~
=
./boost/date_time/gregorian_calendar.ipp:50:15: note: remove extraneous
parentheses around the comparison to silence this warning
if ((week == 53)) {
~ ^ ~
1 warning generated.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5252> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC