On Tue, 29 Oct 2024, Jakub Jelinek wrote:

> Hi!
> 
> The following patch adds the C2Y N3370 paper support.
> We had the case ranges as a GNU extension for decades, so this patch
> simply:
> 1) adds different diagnostics when it is used in C (depending on flag_isoc2y
>    and pedantic and warn_c23_c2y_compat)
> 2) emits a pedwarn in C if in a range conversion changes the value of
>    the low or high bounds and in that case doesn't emit -Woverflow and
>    similar warnings anymore if the pedwarn has been diagnosed
> 3) changes the handling of empty ranges both in C and C++; previously
>    we just warned but let the values be still looked up in the splay
>    tree/entered into it (and let only gimplification throw away those
>    empty cases), so e.g. case -6 ... -8: break; case -6: break;
>    complained about duplicate case label.  But that actually isn't
>    duplicate case label, case -6 ... -8: stands for nothing at all
>    and that is how it is treated later on (thrown away)
> 
> Older version has been bootstrapped/regtested on x86_64-linux and i686-linux
> successfully (without the last hunk in c_add_case_label and some of testcase
> additions), ok for trunk if even this updated patch passes
> bootstrap/regtest?

OK.

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to