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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(A)3 is a valid value for a and is not handled by the switch.
See http://eel.is/c++draft/dcl.enum#8
In your case, the underlying type is fixed int, and so a can have any int
value.
Even if you used just enum A { X, Y, Z }, (A)3 would still be within the valid
range of values.

Reply via email to