Opened 7 years ago
Last modified 7 years ago
#11502 assigned Bugs
narrow_encoding: -Wtype-limits warning is reported
Reported by: | davido | Owned by: | Sebastian Redl |
---|---|---|---|
Milestone: | To Be Determined | Component: | property_tree |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
-Wtype-limit is reported on this assert:
char to_internal_trivial(char c) const {
assert(c <= 0x7f); <=== Type limit return c;
}
Change History (2)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Status: | new → assigned |
---|
Should be fixed by commit 6a033ffca2b8219bb581c013c3bbd6c31f8151ff
Note:
See TracTickets
for help on using tickets.
We see the following error when not compiling with GCC 4.4.7 on CentOS 6 without -DNDEBUG:
.../boost/property_tree/detail/json_parser/narrow_encoding.hpp: In member function ‘char boost::property_tree::json_parser::detail::utf8_utf8_encoding::to_internal_trivial(char) const’: .../boost/property_tree/detail/json_parser/narrow_encoding.hpp:71: error: comparison is always true due to limited range of data type
Our solution is to remove the assert with a patch.
I'd love if this could be addressed in Boost 1.61.0.