tzlaine / parser

A C++ parser combinator library.
Boost Software License 1.0
69 stars 12 forks source link

Compiler warnings #167

Open dschwen opened 2 months ago

dschwen commented 2 months ago

We're about to use this library in a big software project that has strict guidelines about compiler warnings. The parser library emits a bunch of unused parameter warnings. We could silence -Wunused-parameter for the parser includes, but you might be interested in cleaning those up.

dschwen commented 2 months ago

These comparison is always false due to limited range of data type warnings are a bit concerning. Looks like curr_c is a signed char, which cannot represent 0xe0 etc.

/home/schwd/Programs/moose-capability-registry/framework/contrib/boost/include/boost/parser/detail/text/transcode_iterator.hpp:2914:35: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 2914 |                 } else if (curr_c == 0xe0) {
      |                            ~~~~~~~^~~~~~~
/home/schwd/Programs/moose-capability-registry/framework/contrib/boost/include/boost/parser/detail/text/transcode_iterator.hpp:2946:35: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 2946 |                 } else if (curr_c == 0xed) {
      |                            ~~~~~~~^~~~~~~
/home/schwd/Programs/moose-capability-registry/framework/contrib/boost/include/boost/parser/detail/text/transcode_iterator.hpp:2979:35: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 2979 |                 } else if (curr_c == 0xf0) {
      |                            ~~~~~~~^~~~~~~
/home/schwd/Programs/moose-capability-registry/framework/contrib/boost/include/boost/parser/detail/text/transcode_iterator.hpp:3025:35: warning: comparison is always false due to limited range of data type [-Wtype-limits]
 3025 |                 } else if (curr_c == 0xf4) {
      |                            ~~~~~~~^~~~~~~