https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54543

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The code is valid.

The workaround we use in the library is to use the comma operator:

        return ((0 <= n && n < 10) ? arr : (throw "error", arr))[n];

Reply via email to