[Boost-bugs] [Boost C++ Libraries] #2986: Boost.Filesystem warnings when wchar_t is 16-bit are a problem when warnings are treated as errors

Subject: [Boost-bugs] [Boost C++ Libraries] #2986: Boost.Filesystem warnings when wchar_t is 16-bit are a problem when warnings are treated as errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-03 23:01:55


#2986: Boost.Filesystem warnings when wchar_t is 16-bit are a problem when
warnings are treated as errors
-----------------------------------+----------------------------------------
 Reporter: spencer_at_[hidden] | Owner: bemandawes
     Type: Patches | Status: new
Milestone: Boost 1.39.0 | Component: filesystem
  Version: Boost 1.38.0 | Severity: Cosmetic
 Keywords: warnings wchar_t UCS2 |
-----------------------------------+----------------------------------------
 When wchar_t is 16-bit, some code in Boost.Filesystem can trigger range
 comparison warnings:

 src/libs/detail/utf8_codecvt_facet.cpp:245: warning: comparison is always
 true due to limited range of data type
 src/libs/detail/utf8_codecvt_facet.cpp:248: warning: comparison is always
 true due to limited range of data type
 src/libs/detail/utf8_codecvt_facet.cpp:251: warning: comparison is always
 true due to limited range of data type

 There is a note near this code that says to ignore these warnings if
 wchar_t is UCS2 (16-bit), but if the compiler is treating (all) warnings
 as errors, this is difficult to do automatically.

 Something along the lines of the attached patch should allow the code to
 work properly in both cases. An alternative solution would be to
 completely remove the specialization if wchar_t is 16-bit (i.e. wrap the
 whole function in the #ifdef guards).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2986>
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:00 UTC