https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99565
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- I think I added OEP_LEXICOGRAPHIC specifically for -Wduplicated-branches (do_warn_duplicated_branches used it first), so we can have it do whatever we want for the warning. So your change looks fine to me.