https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121938
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to post+gcc from comment #6)
> > Let me take that back but this is all out of the scope of the c standard
> > since max enum is int.
>
> I think this changed in C23. There is now just says:
>
> "For an enumeration without a fixed underlying type, the expression that
> defines the value of an enumeration constant shall be an integer constant
> expression. For all the integer constant expressions which make up the
> values of the enumeration constants, there shall be a type capable of
> representing all the values that is a standard or extended signed or
> unsigned integer type, or char."
This works though:
enum enum1 {
A = 18446744071562067968u,
};
enum enum2 {
B = 18446744071562067967u,
};