jarro2783 / cxxopts

Lightweight C++ command line option parser
MIT License
4.16k stars 582 forks source link

unannotated fall-through between switch labels #402

Closed psi29a closed 1 year ago

psi29a commented 1 year ago

Noticed this while running with -Werror,-Wimplicit-fallthrough

../../extern/fetched/cxxopts/include/cxxopts.hpp:2240:3: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
  case 0:
  ^
../../extern/fetched/cxxopts/include/cxxopts.hpp:2240:3: note: insert 'break;' to avoid fall-through
  case 0:
  ^
  break; 
jarro2783 commented 1 year ago

Which compiler and language version are you using?

matttyson commented 1 year ago

I also get this on Microsoft C++ 19.36.32532. I haven't tried it on clang yet but I expect it would complain as well.

jarro2783 commented 1 year ago

which C++ standard are you using?