https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83955
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The warning is correct for c. The enum type is really an int in size and space. That is assigning 3 or 4 to it is still well defined code.