https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67047
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So the enum is an unsigned type so UINTMAX_MAX +1 is 0 as it is always representable due to the rules of unsigned types and wrapping. Unless I miss-understand how this is supposed to work and the wrapping rules for unsigned types don't come into play.