Re: [Boost-bugs] [Boost C++ Libraries] #7068: Compiler warnings in date_time

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7068: Compiler warnings in date_time
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-03 22:11:20


#7068: Compiler warnings in date_time
---------------------------------------+------------------------------------
  Reporter: ZenJu <zhnmju123@…> | Owner: az_sw_dude
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: date_time
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------+------------------------------------

Comment (by marshall):

 Ok. I looked at these warnings, and they are all bogus.
 For example, in int_adapter.hpp, we have:
 {{{
 72: switch (sv) {
 73: case not_a_date_time: return not_a_number();
 74: case neg_infin: return neg_infinity();
 75: case pos_infin: return pos_infinity();
 76: case max_date_time: return (max)();
 77: case min_date_time: return (min)();
 78: default: return not_a_number();
 79: }
 }}}

 which (apparently) gives an error of:
 `C:\Program Files\C++\Boost\boost\date_time\int_adapter.hpp|75|warning:
 enumeration value 'not_special' not handled in switch [-Wswitch-enum]|`

 That's absurd. `not_special` is definitely handled here; it's spelled
 `default`.

 conversion.hpp(33) - this problem.[[BR]]
 int_adapter.hpp(75) - this problem.[[BR]]
 time_system_counted.hpp(149) - this problem.[[BR]]

 I suggest that you turn off this warning and report it as a bug against
 gcc.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7068#comment:2>
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:09 UTC